僅為 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主機名稱。

相關內容