2013-12-17 36 views
0

初始状态:轨,Capistrano的3和SSH代理转发

1)I有PC,其具有只对本地服务器(SSH部署@的LocalServer正在访问,SSH [email protected]不是)。

2)我有本地服务器(如上所述),即有机会获得互联网(SSH [email protected]工作)

3)我需要部署我的Rails中通过该使用Capistrano的电脑应用本地服务器。

我已阅读SSH-agent-forwarding主题,这里是我的情况:

enter image description here

我想要什么:

我想有从PC到我的VPS这样的ssh访问:

ssh [email protected]#.com. 

我该怎么办?可能我需要一些东西在我的〜/ .ssh/config中?

回答

0

我已经找到了解决办法:

在SSH/config文件中,我们应该把以下内容:

Host github.com 
Hostname github.com 
ProxyCommand ssh -q [email protected] nc -q0 %h 22 
User git 

相反github.com的可以有其他主机或只(*):

Host * 
ProxyCommand ssh .... 

另外this(transparent-multihop-ssh)是关于这个问题的非常有用的链接。