【发布时间】:2011-06-18 15:10:05
【问题描述】:
我正在尝试访问托管在防火墙后面的集群上的 GIT 存储库。当我在校园内(位于防火墙后面)时,我可以直接访问集群,并且可以从校园外通过 SSH 连接到特定机器,然后在需要时通过 ssh 连接到集群。
我尝试使用以下方法设置隧道:
sudo ssh -L 9418:cluster:9418 username@ssh.server
但我仍然无法从我的机器上运行“git push”。我知道我遗漏了一些东西,但无法弄清楚。
编辑: 我修改了 ~/.ssh/config 有:
Host cluster
NoHostAuthenticationForLocalhost yes
Hostname localhost
Port 9418
运行 git push 时出现错误:
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly
【问题讨论】:
标签: git ssh port portforwarding tunnel