Linux: ssh X11 forwarding does not work

Hi,

a friend of mine had the problem that X11 forwarding does not work on his linux box. I obligate him to check:

Ensure a X11 server is running at your local client.

Is X11 forwarding enabled in /etc/ssh/sshd_config on the host from which you want to receive windows?

root@devdeb ~ # grep -i forwa /etc/ssh/sshd_config
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#X11Forwarding no
X11Forwarding yes
#       X11Forwarding no
#       AllowTcpForwarding no

Is the xorg-x11-xauth installed?
On debian

root@debdevt:~# dpkg -l|grep xauth
ii  xauth                              1:1.0.9-1                         amd64        X authentication utility

On RedHat or OpenSuSE

root@devsuse ~ # rpm -qa|grep -i xauth
xorg-x11-xauth-1.0.2-7.1.el6.x86_64

Is the client which should display your windows allowed to trust X11 forwarded connections?

root@devdeb ~ #grep -i forwa /etc/ssh/ssh_config
#   ForwardAgent no
#   ForwardX11 no
ForwardX11Trusted yes

When X11 forwarding is enabled and you have established a ssh connection a listing tcp socket on lo interface at port 60xx must exist. xx is the display number.

root@debdevt:~# netstat -tln|egrep -e 60[0-9][0-9]
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN

If using PuTTY or KiTTY check your config

PuTTY enable X11 forwarding
PuTTY enable X11 forwarding

Michael

Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.