“ssh -Y” fails moaning “X11 forwarding request failed on channel 0” – solved!

$ ssh -v -Y REMOTE_HOST
[…]
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Requesting authentication agent forwarding.
X11 forwarding request failed on channel 0

I looked around and I found this article:

The article advises to edit /etc/ssh/sshd_config on the remote system:

$ sudo vi /etc/ssh/sshd_config

and to add these lines:

X11Forwarding yes
X11UseLocalhost no

The remote sshd needs reloading, and because the remote system uses systemd, this is how:

$ systemctl restart sshd

Now after a new “ssh -Y” I can start xeyes and it gets displayed on my PC’s Cygwin/X server.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.