X11 forwarding request failed on channel 0

I cannot open X11 when I connect to OS X Sierra from OS X El Capitan (or from any older OS Xs).

Once I "ssh -X" or "ssh -Y" into Sierra I get

"X11 forwarding request failed on channel 0"

If I type "echo $DISPLAY" I get an empty line.


I tried to follow the suggestions from

x11 Forwarding

but that discussion applied to Yosemite. I still tried to modify the Yosemite file /etc/sshd_config which I think is now the Sierra file /etc/ssh/sshd_config and add the lines


X11Forwarding yes

X11DisplayOffset 10

X11UseLocalhost no


although I noticed the Sierra file has a bit different names, e.g., ForwardX11 instead of X11Forwarding.


Adding the above three lines did not solve the problem. Interestingly, when I tried to restart the ssh service following the suggestions from the above discussion:


cd /System/Library/LaunchDaemons

launchctl unload ssh.plist

launchctl load ssh.plist


I noticed the following: after typing "launchctl unload ssh.plist" I got


"Could not find specified service"


and after typing "launchctl load ssh.plist" I got


"Service is disabled"


I then rebooted the computer but that did not help either.


I would appreciate any input.

Mac Pro, macOS Sierra (10.12)

Posted on Jun 9, 2017 11:43 AM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

X11 forwarding request failed on channel 0

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.