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.