仅为 Linux 中的某些服务器设置 SSH 代理

仅为 Linux 中的某些服务器设置 SSH 代理

我按照http://returnbooleantrue.blogspot.com/2009/06/using-github-through-draconian-proxies.html但随后连接内部服务器失败:

Proxy could not open connnection to 192.168.1.***:  Forbidden
ssh_exchange_identification: Connection closed by remote host
svn: Commit failed (details follow):
svn: Network connection closed unexpectedly

我可以设置config文件以使其ProxyCommand仅用于 ssh.github.com 吗?

答案1

绝对如此。将该指令放在单独的一Host节中。

Host github-external
    HostName ssh.github.com
    ProxyCommand dosomethinghere

然后用作github-external主机名。

相关内容