Lucid X11 Forwarding Woes [SOLVED]

I have had some problems getting X11 forwarding to work with Lucid (using PuTTY from a Windoze XP VM running on the same box).

PuTTY log showed ‘X11 forwarding refused’; on the Host (Ubuntu), the /var/log/auth.log showed ‘error: Failed to allocate internet-domain X11 display socket’.

Various googling pointed to an issue with sshd and ipV6 – this shouldn’t have been my problem because I’d previously disabled ipV6 per the instructions here

However, what was odd was that even with ipV6 disabled, netstat -lntp still showed as sshd listening on :::22. I had no problems connecting with SSH, but X11 just didn’t work.

More googling suggested running sshd with the -4 switch, and uncommenting the LocalAddress=0.0.0.0 in /etc/ssh/sshd_config.

Neither of these worked for me, either separately or together, even though netstat now showed it listening on 0.0.0.0:22

What WORKED for me was to add ‘AddressFamily inet’ to /etc/ssh/sshd_config

YMMV but I hope this saves someone some time.

7 thoughts on “Lucid X11 Forwarding Woes [SOLVED]

  1. Thanks a million for your solution! We had exactly the same problem here on openSUSE 11.3. ipV6 was enabled by default and we disabled it. However, with the default sshd_config we had no chance to forward X11. But your ‘AddressFamily inet’ works!!!
    Great job!

  2. Thanks a lot❣ I had the same problem (Ubuntu Lucid 10.04).
    X11 forwarding stopped working rather recently. I assume after I had disabled ipv6 on the machine… (the ipv6 I got from dhcp wasn’t OK and a temporary solution was to disable it as I had problem reaching ipv6 enabled sites).
    I haven’t checked if disabling ipv6 was what caused the problem though.

  3. Thanks a lot. Solved my ssh problem also. I had tried everything else and could not get past X11 forwarding refused.

Leave a Reply

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