[wplug] ssh X11 forwarding problem

Bill Moran wmoran at potentialtech.com
Thu Sep 4 08:23:45 EDT 2008


In response to "Zach Uram" <netrek at gmail.com>:

> Ok from my local host I can ssh into a host on network A with 'ssh -X
> foo at bar' and it works, I tested by running xeyes.
> It automagically sets the DISPLAY to 'localhost:10.0' (it actually
> shows the word localhost).
> 
> Now when I try the same thing on a host on network B with 'ssh -X
> root at baz' it fails with:
> 
> Error: Can't open display
> 
> I checked the value of DISPLAY (echo $DISPLAY) after I ssh in and this
> time it is set to nothing.
> 
> So I tried setting display to my local IP on various combinations and
> they all fail with "Error: Can't open display ip:10.0", "Error: Can't
> open display ip:0.0" etc..
> 
> So what is going on? Both hosts running Open SSH, I even disabled the
> firewall on the host on network B and then I tried locally "xhost
> +network-b-host-ip" to explicitly allow it and still no luck. I didn't
> have to bother with any of this for it to with network A's host.
> 
> The X11 forwarding worked fine on host A (a school host) yet fails on
> host B (my VPX box).
> 
> Any clue how I can fix this and why it works on network A's host but not on B's?

1) Make sure xauth is installed on the remote system.
2) Make sure the sshd_config on the server has the setting X11UseLocalhost no

-- 
Bill Moran
http://www.potentialtech.com


More information about the wplug mailing list