Sponsored Content
Special Forums Cybersecurity ssh X-forwarding and remote forwarding behind proxy Post 302250787 by vampirodolce on Friday 24th of October 2008 08:49:39 AM
Old 10-24-2008
ssh X-forwarding and remote forwarding behind proxy

Hi,
from my workplace we use a proxy to connect to the outside world, including external ssh servers.
The problem is that the server is seeing the connection coming from the proxy and knows nothing about the client behind it. The ssh connection itself works fine, but x-forwarding does not work as expected. In my opinion this is because the server is trying to use the display of the proxy and not the one of the client.
Same issue with remote port forwarding, when someone uses the remote port I think the ssh server forwards the request to the proxy and not to the real client.

I have found two workarounds to solve the x-forwarding issue:
-create a VPN between the client and the server, and do the x-forwarding inside the VPN (which is similar to a LAN)
-install a VNC server on the ssh server, a VNC client on the ssh client and do a local port forwarding, then connect to localhost:xxxx

I'm sure the VPN solution will fix the remote forwarding as well, but... is there a way to get around these issues without using other software, maybe some kind of environment variables to set in OpenSSH?
Thanks.
 

10 More Discussions You Might Find Interesting

1. OS X (Apple)

ssh forwarding to X11

Hi, I have issues with running graphical interfaces on my computer being remotely logged into a network via the -X option of ssh. My .cshrc shows DISPLAY=hostname:0 and I think there should be a different number instead of the 0. I changed the ssh_config file already to 'X11 forwarding yes', which... (0 Replies)
Discussion started by: ginese
0 Replies

2. UNIX for Advanced & Expert Users

Problem with OpenSSH Remote Port Forwarding with Bind_address

As in the ssh(1) man page: -R bind_address:]port:host:hostport .......By default, the listening socket on the server will be bound to the loopback interface only. This may be overridden by specifying a bind_address. An empty bind_address, or the address `*', indicates... (2 Replies)
Discussion started by: ahmad.zuhd
2 Replies

3. Shell Programming and Scripting

SSH Tunnel Forwarding with no shell

Hi Experts, I am trying to have the SSH tunnel Remote forwarding command in a shell script. I should be able to do 2 tasks, but unable to get that going. 1) I have 3 servers Server 1, Server 2, Server 3. I have my Database running on Server 1 and my script running on Server 2 which should... (0 Replies)
Discussion started by: Scriptingglitch
0 Replies

4. UNIX for Dummies Questions & Answers

SSH port forwarding/tunneling

So this seems like something that should be simple...but I can't quite seem to get it up and running. I have a machine, .107 with a GUI on port 8443. The problem is that I can't connect directly to .107 from my laptop. Now I have another machine, .69 that can connect to .107. So shouldn't I be able... (4 Replies)
Discussion started by: DeCoTwc
4 Replies

5. AIX

Forwarding AIX syslog/errorlog to remote SQL DB

Due to a project I'm currently tasked with I'm spending my time trying to find a way to forward the syslog to a remote, in this case Red Hat, server and squeezing it into a SQL DB. Rsyslog is doing this job quite nicely for most of our test-servers, but I couldn't find any reliable information on... (1 Reply)
Discussion started by: Skleindl
1 Replies

6. UNIX for Advanced & Expert Users

SSH X forwarding question

Hi, Local PC - Ubuntu 11.04 desktop Remote PC - Debian 6.0 desktop My problem is 2 desktops, remote and local, are displayed on the same workplace on local PC. It would be quite confusing. Is there any way to display each desktop on one workplace(on its own workplace) OR displaying both... (0 Replies)
Discussion started by: satimis
0 Replies

7. Cybersecurity

X forwarding vs Remote DISPLAY

Hello, I have a question about X forwarding. I was told that we can't X forwarding anymore, do to a security checklist. Example: bitlord@server1# ssh -X server2 So we have to use the DISPLAY variable now. I thought this was less secure? Example: bitlord@server1# xhost + server2 server1... (0 Replies)
Discussion started by: bitlord
0 Replies

8. IP Networking

Ftp over SSH port forwarding

Hi, I'm trying to connect ftp over ssh port forwarding to a sever(UnixC) behind FireWall(F/W). here's my env and question. UnixA(SSH Client) ----F/W ---- UnixB(SSH Svr) ---- UnixC (FTP, 21) UnixA wants to connect ftp service of UnixC via SSH port forwarding on UnixB. Unix A,... (3 Replies)
Discussion started by: hanyunq
3 Replies

9. Shell Programming and Scripting

SSH forwarding based on ports

Hi guys, I'm trying to set up an Ubuntu VPN server that will forward an ssh connection automatically as a proxy to two separate LAN hosts. What I'm looking at doing is making SSH listen on two ports (if that is possible) and get some kind of script, preferably something in bash, that will listen... (2 Replies)
Discussion started by: 3therk1ll
2 Replies

10. Shell Programming and Scripting

Ssh agent forwarding in script did not work

Sorry for the wrong question. (2 Replies)
Discussion started by: hce
2 Replies
MOSH(1) 						      General Commands Manual							   MOSH(1)

NAME
mosh - mobile shell with roaming and intelligent local echo SYNOPSIS
mosh [options] [--] [user@]host [command...] DESCRIPTION
mosh (mobile shell) is a remote terminal application that supports intermittent connectivity, allows roaming, and provides speculative local echo and line editing of user keystrokes. Compared with ssh, mosh is more robust -- its connections stay up across sleeps and changes in the client's IP address -- and more respon- sive, because the protocol is tolerant of packet loss and the client can echo most keystrokes immediately, without waiting for a network round-trip. mosh uses ssh to establish a connection to the remote host and authenticate with existing means (e.g., public-key authentication or a pass- word). mosh executes the unprivileged mosh-server helper program on the server, then closes the SSH connection and starts the mosh-client, which establishes a long-lived datagram connection over UDP. To improve responsiveness, mosh runs a predictive model of the server's behavior in the background, trying to guess the effect of each key- stroke on the screen. It makes predictions for normal typing, backspace, and the left- and right-arrow keys. When it is confident, mosh displays the predictions without waiting for the server. The predictive model must prove itself anew on each row of the terminal and after each control character, so mosh avoids echoing passwords or non-echoing editor commands. By default, mosh shows its predictions only on high-latency connections and to smooth out network glitches. (On longer-latency links, the predicted cells are underlined until confirmed by the server.) Occasional echo mistakes are corrected within a network round-trip and do not cause lasting effect. mosh does not support X forwarding or the non-interactive uses of SSH, including port forwarding or sshfs. mosh works through typical client-side network address translators but requires UDP to pass between client and server. By default, mosh uses the ports between 60000 and 61000, but allows the user to request a particular UDP port instead. mosh will do its best to arrange a UTF-8 character set locale on the client and server. The client must have locale-related environment variables that specify UTF-8. mosh will pass these client variables to the mosh-server on its command line, but in most cases they will not need to be used. mosh-server first attempts to use its own locale-related environment variables, which come from the system default config- uration (sometimes /etc/default/locale) or from having been passed over the SSH connection. But if these variables don't call for the use of UTF-8, mosh-server will apply the locale-related environment variables from the client and try again. OPTIONS
command Command to run on remote host. By default, mosh executes a login shell. --client=PATH path to client helper on local machine (default: "mosh-client") --server=COMMAND command to run server helper on remote machine (default: "mosh-server") The server helper is unprivileged and can be installed in the user's home directory. --ssh=COMMAND OpenSSH command to remotely execute mosh-server on remote machine (default: "ssh") An alternate ssh port can be specified with, e.g., --ssh="ssh -p 2222". --predict=WHEN Controls use of speculative local echo. WHEN defaults to `adaptive' (show predictions on slower links and to smooth out network glitches) and can also be `always` or `never'. The MOSH_PREDICTION_DISPLAY environment variable controls this setting permanently and can adopt the same three values. Even on `always', mosh will only show predictions when it is confident. This generally means a previous prediction on the same row of the terminal has been confirmed by the server, without any intervening control character keystrokes. -a Synonym for --predict=always -n Synonym for --predict=never -p NUM, --port=NUM Use a particular server-side UDP port, for example, if this is the only port that is forwarded through a firewall to the server. Otherwise, mosh will choose a port between 60000 and 61000. ESCAPE SEQUENCE
The escape sequence to shut down the connection is Ctrl-^ . (typically typed with Ctrl-Shift-6, then a period). To send a literal Ctrl-^, type Ctrl-^ ^. ENVIRONMENT VARIABLES
MOSH_PREDICTION_DISPLAY Controls local echo as described above. MOSH_TITLE_NOPREFIX When set, inhibits prepending "[mosh]" to window title. SEE ALSO
mosh-client(1), mosh-server(1). Project home page: http://mosh.mit.edu AUTHOR
mosh was written by Keith Winstein <mosh-devel@mit.edu>. BUGS
Please report bugs to mosh-devel@mit.edu. Users may also subscribe to the mosh-users@mit.edu mailing list, at http://mailman.mit.edu/mailman/listinfo/mosh-users February 2012 MOSH(1)
All times are GMT -4. The time now is 04:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy