如何解决使用SSH隧道代理时出现“打开失败:管理禁止:打开失败”的问题

AGa*_*yer 25 ssh-tunnel

我一直在 Windows 上使用 SSH 隧道(使用 Putty)。

在windows上用putty一直没问题,但是在mac或者cygwin上,有时候会提示警告信息:

open failed: administratively prohibited: open failed

Har*_*nan 22

我相信您已禁用服务器上的 TCP 转发。在您的服务器中, /etc/ssh/sshd_config确保以下行不存在或没有注释,否则对其进行注释。

AllowTcpForwarding no
Run Code Online (Sandbox Code Playgroud)

  • 刚刚搜索,它是`AllowTcpForwarding yes` (9认同)
  • 答案表明答案中的行是_不应该_出现的 (2认同)

小智 7

Unix StackExchange 上的 SSH 隧道对此错误进行了更广泛的讨论。简而言之,这是一个非特定错误;有许多可能性值得探讨。