通过 ssh 隧道进行 OS X 屏幕共享时出现错误:“通道 3:打开失败:管理禁止:打开失败”

问题描述 投票:0回答:1

我通过 ssh 隧道配置了 OS X 屏幕共享,但在某些时候它停止工作。 ssh 隧道可以工作:

ssh -L 1202:localhost:5900 [email protected]

但是,当尝试建立屏幕共享连接 (

vnc://localhost:1202
) 时,远程主机会出现错误并显示

channel 3: open failed: administratively prohibited: open failed
macos vnc ssh-tunnel screensharing
1个回答
0
投票

我的远程主机中有以下内容:


~/.ssh.config

缺少的元素是远程主机的 
AllowTCPForwarding yes PermitOpen any

中定义

/etc/hosts
的条目。我将以下内容添加到该文件中,并且通过 ssh 隧道的屏幕共享已恢复:

localhost

© www.soinside.com 2019 - 2024. All rights reserved.