Hi guys
I use ssh tunneling to manage my remote systems, but until today I have never attempted to forward X over a tunnel (I don't have X servers running remotely and I have never seen the need to run X based graphical programs on those servers).
Today I wanted to run etherape on a remote server so that I could watch the traffic patterns.
So. I changed the remote server's sshd_config to enable X forwarding ("X11Forwarding no" becomes "X11Forwarding yes") and restarted sshd. On my desktop I similarly changed my local ssh_config file to allow X forwarding ("ForwardX11 no" becomes "ForwardX11 yes") to obviate the need to use the -X switch on the command line.
I then installed etherape on the remote server and fired it up only to get the message "Error: no display specified". Sure enough "echo $DISPLAY" shows nothing. But I thought (and everything I have read confirms) that ssh should take care of setting the appropriate display when X11 forwarding is set.
I then tried setting a display manually (export DISPLAY=localhost:10.0 on the remote server) and got the response "Error: cannot open display: localhost:10.0"
I must be missing something. What am I doing wrong and how can I fix it? Surely I don't have to have an X server running on the remote host?
Thanks in advance.
Mick
On 12 Dec 14:56, mick wrote:
Hi guys
I use ssh tunneling to manage my remote systems, but until today I have never attempted to forward X over a tunnel (I don't have X servers running remotely and I have never seen the need to run X based graphical programs on those servers).
Today I wanted to run etherape on a remote server so that I could watch the traffic patterns.
So. I changed the remote server's sshd_config to enable X forwarding ("X11Forwarding no" becomes "X11Forwarding yes") and restarted sshd. On my desktop I similarly changed my local ssh_config file to allow X forwarding ("ForwardX11 no" becomes "ForwardX11 yes") to obviate the need to use the -X switch on the command line.
I then installed etherape on the remote server and fired it up only to get the message "Error: no display specified". Sure enough "echo $DISPLAY" shows nothing. But I thought (and everything I have read confirms) that ssh should take care of setting the appropriate display when X11 forwarding is set.
I then tried setting a display manually (export DISPLAY=localhost:10.0 on the remote server) and got the response "Error: cannot open display: localhost:10.0"
I must be missing something. What am I doing wrong and how can I fix it? Surely I don't have to have an X server running on the remote host?
On the server:
sudo apt-get install xauth
Then disconnect and reconnect the client.
Jobs a good un.
On Mon, 12 Dec 2011 15:55:23 +0000 Brett Parker iDunno@sommitrealweird.co.uk allegedly wrote:
I must be missing something. What am I doing wrong and how can I fix it? Surely I don't have to have an X server running on the remote host?
On the server:
sudo apt-get install xauth
Then disconnect and reconnect the client.
Jobs a good un.
Brett you're a star. Worked first time.
Now to read the xauth man page....
Mick
On 12 Dec 16:02, mick wrote:
On Mon, 12 Dec 2011 15:55:23 +0000 Brett Parker iDunno@sommitrealweird.co.uk allegedly wrote:
I must be missing something. What am I doing wrong and how can I fix it? Surely I don't have to have an X server running on the remote host?
On the server:
sudo apt-get install xauth
Then disconnect and reconnect the client.
Jobs a good un.
Brett you're a star. Worked first time.
Now to read the xauth man page....
It's *really* boring... basically the reason is that ssh itself uses xauth to generate the proxy cookie between the client and the server, the server never has authentication to the client at all, it gets rewritten by the ssh client in realtime.
xauth is just a way of managing the keys, in effect - not really worth reading the man page for - you'll have it on the client always (it's kinda nigh impossible to run an X11 environment without it!).
Cheers,