我是这个论坛的新手,所以不要这样评价我:
我想通过其他服务器B连接到:sftp客户端(Bitise Tunneler)和nxClient(NOMACHINE)到服务器A.因为服务器B可从我的电脑到达,而A不是。
我明白我需要某种隧道。 但不知道该怎么做。
非常感谢。
~/.ssh/config的以下SSHconfiguration允许您轻松设置隧道。 它需要在中间主机上安装nc 。
Host *%* ProxyCommand ssh $(echo %h | cut -d%% -f2-) nc $(echo %h | cut -d%% -f1) %p
运行ssh host1.example.com%host2.example.com将通过host2 SSH连接到host1。 我不知道你的SFTP客户端是否会使用这个configuration。 在这种情况下,您可以手动设置一个隧道,以便像下面这样使用它:
ssh -fNL 10022:host1.example.com:22 host2.example.com
然后configurationSFTP客户端连接到localhost:10022 。