X11 session over ssh, problem



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?

_________________________________________________________________
MSN Hotmail is evolving ? check out the new Windows Live Mail http://ideas.live.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: probleme mit ssh
    ... waehrend das entfernte System der Server ist. ... Bei X11 ist alles andersherum, da ist das entfernte System der Client ... und dein lokales Display der Server. ... DArum brauchsts bei SSH ...
    (de.comp.os.unix.networking.misc)
  • Re: Suggestions for a square font?
    ... > ssh -X creates a tunnel from distant_computer to your real X server at ... > the tunneled X display, connecting directly to the X ... Let's say that the first line was for ssh users and the second ... connect through ssh and play a curses game. ...
    (rec.games.roguelike.development)
  • Re: probleme mit ssh
    ... waehrend das entfernte System der Server ist. ... und dein lokales Display der Server. ... DArum brauchsts bei SSH ... SSH hat das fuer X11 aber bereits ...
    (de.comp.os.unix.networking.misc)
  • RE: Problem with X server
    ... Try tunneling everything through ssh. ... This gets around the need to use the xhost and export display settings. ... Subject: Problem with X server ... On the local host, type: ...
    (RedHat)
  • Re: X11 session over ssh, problem
    ... Three machines on my LAN are relevant. ... then on A I can run stuff like xpdf and it opens a window on O, ... The DISPLAY environment variable seems to be set correctly on B: ... re-created when I ssh to B. ...
    (Debian-User)