[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: X11 session over ssh, problem



On Fri, Dec 29, 2006 at 10:33:14AM +0000, Roger Morgan wrote:
> The problem is that I ssh to a server, and then try to run a program that 
> requires an X display. I want it to use the X server on my workstation. It 
> doesn't. It just does nothing.
> 
> Details: Three machines on my LAN are relevant. Call the one I'm sitting at 
> O, and the others A and B.
> O runs Sarge, A runs Etch, and B runs woody.
> >From O, I can successfully use X over ssh on A; I do this on O:
> xterm -e ssh A &
> then on A I can run stuff like xpdf and it opens a window on O, as expected.
> 
> But if I do the same to B (i.e. xterm -e ssh B &), then try to run a 
> program like xpdf which uses X, it doesn't work. xpdf just sits in the 
> background, doing nothing, until some timeout occurs, then emits the error 
> message: "Cannot connect to X server localhost:10.0". The problem is not 
> specific to xpdf, it's the same with any X program (but some emit 
> additional error-message text).
> 
> Here's the contents of /etc/ssh/sshd_config on B, excluding comments:
> Port 22
> ListenAddress 192.168.1.9
> Protocol 2
> HostKey /etc/ssh/ssh_host_rsa_key
> HostKey /etc/ssh/ssh_host_dsa_key
> UsePrivilegeSeparation yes
> PAMAuthenticationViaKbdInt no
> KeyRegenerationInterval 3600
> ServerKeyBits 768
> SyslogFacility AUTH
> LogLevel INFO
> LoginGraceTime 600
> PermitRootLogin no
> StrictModes yes
> RSAAuthentication yes
> PubkeyAuthentication yes
> RhostsAuthentication no
> IgnoreRhosts yes
> RhostsRSAAuthentication no
> HostbasedAuthentication no
> PermitEmptyPasswords no
> PasswordAuthentication yes
> X11Forwarding yes
> AllowTcpForwarding yes
> X11DisplayOffset 10
> PrintMotd no
> KeepAlive yes
> Subsystem       sftp    /usr/lib/sftp-server
> 
> and here's the contents of ssh_config on B (comments stripped):
> Host *
> ForwardX11 yes
> 
> The contents of files on O are presumably correct, since everything works 
> when I do
> xterm -e ssh A &
> 
> The DISPLAY environment variable seems to be set correctly on B:
> echo $DISPLAY
> gives
> localhost:10.0
> which is correct for redirecting an X session back to my workstation, it 
> has applied the X11DisplayOffset from the config file correctly.
> 
> The /etc/hosts file on B starts with:
> 127.0.0.1       localhost
> 
> xauth is installed on B, and if I delete the .Xauthority file, it gets 
> re-created when I ssh to B (as it should).
> 
> The files /etc/hosts.allow and /etc/hosts.deny are empty except for 
> comments on all these machines.
> 
> The file ~/.ssh/config on B contains one line:
> ForwardX11 yes
> 
> (the file does not exist on A, by the way).
> I can't think of anything else to check. Ideas, anyone?

I would step back and just use 'ssh' from within the xterm
rather than trying to create a new xterm and the ssh connection
at once. Unlikely to make a difference in itself, but reduces the
complexity of what is going on.

Then pass '-v' or '-v -v' to ssh to see the details of the handshake,
and check for differences between the working and non-working
combinations.

I don't have woody running anyware, so don't know if there are any
issues with it.

It might also be worth trying to ssh to each machine from itself
to make sure that degenerate case is working.

The last thing that springs to mind would be to swap the IP addresses
(and locations if not on the same subnet) of A and B to determine if the
problem is network related rather than a function of the installed
software. Alternatively, boot identical operating systems on the
two machines (perhaps a live CD) and confirm if the difference if
due the the specific OS install rather than networking issues or
issues with the way O is configured.

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: