
答案1
打开你/etc/ssh/ssh_config并启用ProxyCommand。
ProxyCommand ssh -q -W %h:%p gateway.example.com
并根据您的环境更改值。所有连接都将使用代理。
如果您只需要在单个主机上进行代理,请~/.ssh/config
为主机创建并添加自定义设置
Host hostname1
ProxyCommand ssh -q -W %h:%p gateway.example.com
打开你/etc/ssh/ssh_config并启用ProxyCommand。
ProxyCommand ssh -q -W %h:%p gateway.example.com
并根据您的环境更改值。所有连接都将使用代理。
如果您只需要在单个主机上进行代理,请~/.ssh/config
为主机创建并添加自定义设置
Host hostname1
ProxyCommand ssh -q -W %h:%p gateway.example.com