xauth + (X11Forwarding Yes and X11UseLocalhost yes) == Still no Forwarding ?
I was searching for this fix for quite some time. I couldn’t forward X anymore using “ssh -Y” or “ssh -X” on my debian server (i have xauth installed), i was always getting this error:
~$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
“X11UseLocalhost no” was making it working but this wasn’t the right solution..
On this bug report i found out i had the same problem and the same symptoms: i had disabled ipv6 support, and this is what broke the forwarding!
The solution is to add:
in sshd_config! (or enable ipv6 again ;))