sshd X11 forwarding does not work

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
SPxx
Posts: 8
Joined: 2007/05/08 14:22:43

sshd X11 forwarding does not work

Post by SPxx » 2007/05/09 16:37:28

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?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: sshd X11 forwarding does not work

Post by gerald_clark » 2007/05/09 16:56:25

It works for me.

michaelnel
Posts: 1478
Joined: 2006/05/29 16:50:11
Location: San Francisco, CA

Re: sshd X11 forwarding does not work

Post by michaelnel » 2007/05/09 16:58:14

Did you restart sshd after modifying the configuration file?

SPxx
Posts: 8
Joined: 2007/05/08 14:22:43

Re: sshd X11 forwarding does not work

Post by SPxx » 2007/05/09 17:06:40

[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.

SPxx
Posts: 8
Joined: 2007/05/08 14:22:43

Re: sshd X11 forwarding does not work

Post by SPxx » 2007/05/09 17:18:46

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.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: sshd X11 forwarding does not work

Post by gerald_clark » 2007/05/09 17:23:29

I have
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

and it works.

Post Reply