You are not logged in.

#1 2011-02-05 02:09:03

tntcoda
Member
Registered: 2007-07-24
Posts: 115

SSH X11 Forwarding

Hi,

Having major problems getting X11 forwarding over SSH working.

So the client box is fine, that works when I test forwarding with SSH from an Ubuntu box.

My server has X up and running on tty7 (just idling at gdb login) and my sshd_config has the following defined:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
AllowTcpForwarding yes

I think the problem is related to the $DISPLAY variable:

[jack@tcore ~]$ ssh -XY 192.168.1.43
jack@192.168.1.43's password: 
Last login: Sat Feb  5 02:04:47 2011 from 192.168.1.64
[jack@se ~]$ ps -e | grep X
 1415 tty7     00:00:08 X
[jack@se ~]$ echo $DISPLAY
localhost:10.0
[jack@se ~]$ xterm
xterm Xt error: Can't open display: localhost:10.0

I've tried setting DISPLAY to :0.0 and numerous other things but it wont work sad

I cant run xhost + becuase that fails with the same $DISPLAY error.

Thanks for any help smile

Last edited by tntcoda (2011-02-05 02:11:14)

Offline

#2 2011-02-05 04:13:00

barto
Member
From: Budapest, Hungary
Registered: 2009-10-22
Posts: 88

Re: SSH X11 Forwarding

Sounds to be relatated to  ~/.Xauthority. Try to delete (or just rename) it and let it be recreated at relogin. If it doesn't help, man xauth. smile


“First principle, Clarice. Simplicity” – Dr. Hannibal Lecter

Offline

#3 2011-02-05 12:33:30

tntcoda
Member
Registered: 2007-07-24
Posts: 115

Re: SSH X11 Forwarding

Thanks, ok so having deleted .Xauthority (it got recreated at login) it now just hangs indefinitely when I try to do xforwarding (execute xterm) sad Kind of like it's running but the window is being forwarded somewhere else that I can't see.
Also the -Y switch to ssh is supposed to trust all and bypass the X11 security stuff.

Any ideas?

Last edited by tntcoda (2011-02-05 12:38:45)

Offline

#4 2011-02-05 16:21:47

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,538

Re: SSH X11 Forwarding

Try -Y instead of -XY

Offline

#5 2011-02-05 20:55:24

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: SSH X11 Forwarding

I'm not sure I understand you...

You are trying to run a program(xterm) from your server (192.168.1.43) on your ubuntu laptop (192.168.1.64), right?

If that's so... your $DISPLAY seems just fine. Have you disabled the "--nolisten tcp" option on your laptop? (check /etc/X11/xinit/xserverrc) If you run xhost on your laptop what's the output? are you sure you allowed connections from the server?

If you happen to run kdm, be carefull because it runs a different config and you have to change the options in there (at least here in archlinux)

Regards


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

Board footer

Powered by FluxBB