共计 541 个字符,预计需要花费 2 分钟才能阅读完成。
方法一
# Jump box with public IP address
Host jump-box
HostName xxx.xxx.xxx.xxx
User sana
IdentityFile ~/.ssh/jumpbox
# Target machine with private IP address
Host target-box
HostName <IP address of target>
User sana
IdentityFile ~/.ssh/target
ProxyCommand ssh -q -W %h:%p jump-box
方法二
可以通过git自带的connect.exe来完成,可以在git安装目录中找到这个exe文件。
Host xxx.xxx.xxx.xxx
HostName xxx.xxx.xxx.xxx
User root
ProxyCommand D:\Program Files\Git\mingw64\bin\connect.exe -H 127.0.0.1:2080 %h %p
正文完