Page 1 of 1

sshd X11 forwarding does not work

Posted: 2007/05/09 16:37:28
by SPxx
I can't get X11 forwarding in sshd to work. I've just installed CentOS (5) for the first time and I want to use it as a web server. But since there are no decent command line tools I guess I have to use the X11 based, but I don't want to install a desktop/windows system on my server. The solution is to use X11 forwarding but it doesn't work.

I've enabled it in the /etc/ssh/sshd_config file:

# grep X11 /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

and I do use the -X or -Y options for ssh when logging in, but it still doesn't forward X. It doesn't even set the DISPLAY environment var.

It does work when ssh:ing to other boxes.

What more can I try?

Re: sshd X11 forwarding does not work

Posted: 2007/05/09 16:56:25
by gerald_clark
It works for me.

Re: sshd X11 forwarding does not work

Posted: 2007/05/09 16:58:14
by michaelnel
Did you restart sshd after modifying the configuration file?

Re: sshd X11 forwarding does not work

Posted: 2007/05/09 17:06:40
by SPxx
[quote]
michaelnel wrote:
Did you restart sshd after modifying the configuration file?[/quote]

Absolutely, unless there is some other method than
/etc/init.d/sshd restart

I need to use.

Re: sshd X11 forwarding does not work

Posted: 2007/05/09 17:18:46
by SPxx
Thanks all, but I solved it myself: I needed to install xauth to make it work. That should be done automatically IMHO, since CentOS apparently is very dependant on X11.

Re: sshd X11 forwarding does not work

Posted: 2007/05/09 17:23:29
by gerald_clark
I have
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

and it works.