I have 2 Linux Boxes (S1 – 192.168.0.98 and C1 – 192.168.0.76) and a Windows 7 Box (W1 – 192.168.0.91).
One of the Linux machines (S1) was setup with SSH and X forwarding, and the windows box (W1) has Xming server on 0.0.
I can run Putty, then xeyes on the windows box(W1) and it displays fine.
On the second linux box C1), I cannot get remote x running over ssh.
I can log in from C1 to S1 via ssh -X but when I run a graphical program, it doesn't display on the remote machine, it just sits there until a "Can't open display: 192.168.0.76:0.0" comes up.
What am I doing wrong?
Best Answer
Your error message "Can't open display: 192.168.0.76:0.0" doesn't sound like SSH X11 forwarding is in use. Instead, programs on the remote host are trying to connect directly to C1, which won't work for quite a few reasons (Xorg does not listen for TCP connections by default; your firewall blocks them; the Xauth data was not sent correctly...) If X11 forwarding was in effect, then $DISPLAY would point back at the same machine (localhost), and the display number would start at :10.
First, check the $DISPLAY value on C1, and make sure clients on C1 can connect to the X server.
Then retry the connection C1→S1 using
ssh -X -v -v S1
and make sure there are no error messages regarding X11 forwarding; it might be disabled on the server. (If you connect with PuTTY, then Ctrl+rightclick the console and select "Event Log".)To see the server logs, add
LogLevel DEBUG2
to /etc/ssh/sshd_config and restart sshd.