Linux: X11 forwarding not working with putty

Hi,

you have properly configured putty to use X11 forwarding but it fails?


Take a look at the sshd log on the server (on ubuntu the systemd unit is ssh) if you got any error like this:

root@debdev ~# journalctl -xu ssh
...
error: Failed to allocate internet-domain X11 display socket.
...

This error message means that it tries to use IPv6, but its (however) not working. Maybe IPv6 is disabled….

Solution: Verify that

X11Forwarding yes

is set and is not overwritten by any per-user basis options. Also, if you use ssh keys, check your ~/.ssh/authorized_keys file if the any restrictions about x11 forwarding.

... no-X11-forwarding ...

Force sshd to use IPv4. Add the following option before the “listen” option to /etc/ssh/sshd_config.

AddressFamily inet
#ListenAddress 0.0.0.0

Restart sshd and try to connect.

root@debdev ~# systemctl restart ssh

Michael

Leave a Reply Cancel reply