X11 forwarding request failed on channel 0

I got this error while trying to redirect my display to the local host.

marius$ ssh -X oracle@rac1
Warning: the ECDSA host key for 'rac1' differs from the key for the IP address '192.168.100.101'
Offending key for IP in /Users/marius/.ssh/known_hosts:10
Matching host key in /Users/marius/.ssh/known_hosts:13
Are you sure you want to continue connecting (yes/no)? yes
oracle@rac1's password:
X11 forwarding request failed on channel 0
Last login: Mon Apr 25 18:02:35 2016 from 192.168.100.1
[oracle@rac1 ~]$

The solution that I’ve found is this one: just set the X11UseLocalhost to “no” (in my case was set to “yes”):

vi /etc/ssh/sshd_config
...............
X11Forwarding yes
#X11DisplayOffset 10
X11UseLocalhost no
................

Leave Comment

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