简体   繁体   中英

Error: "channel 3: open failed: administratively prohibited: open failed" on OS X Screen Sharing over ssh tunnel

I had configured OS X screen sharing over an ssh tunnel and at some point it stopped working. The ssh tunnel would work:

ssh -L 1202:localhost:5900 user@remote-host.com

However, when attempting to make the screen sharing connection ( vnc://localhost:1202 ), the remote host would error with

channel 3: open failed: administratively prohibited: open failed

I have the following in my remote host's ~/.ssh.config :

AllowTCPForwarding yes
PermitOpen any

The missing element was an entry in the remote host's /etc/hosts that defined localhost . I added the following to that file and screen sharing over ssh tunnel was restored:

127.0.0.1 localhost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM