OSX 通过 SOCKS5 代理 SSH 到服务器
OSX SSH to server through SOCKS5 proxy
我正在尝试通过 SOCKS5 代理连接到服务器。我试过使用 -o 并编辑我的 ~/.ssh/config 文件但无济于事。
这是我试过的 SSH 命令:
ssh -v -o 'ProxyCommand=nc -X 5 -x proxyhost:1080 %h %p' -p22 username@serverhost
问题似乎是我的代理主机需要用户名和密码,我看不到如何在 ProxyCommand 中传递 user/pass。
您需要将用户名和密码传递给nc
command,谁在做您的代理。关于它的所有内容都写在 ncat(1)
:
的手册页中
--proxy-auth user[:pass]
(Specify proxy credentials) .
In connect mode, gives the credentials that will be used to connect to the proxy server. In listen mode, gives the credentials that will be required of connecting clients. For use with --proxy-type http, the form should be user:pass. For --proxy-type socks4, it should be a username only.
我正在尝试通过 SOCKS5 代理连接到服务器。我试过使用 -o 并编辑我的 ~/.ssh/config 文件但无济于事。
这是我试过的 SSH 命令:
ssh -v -o 'ProxyCommand=nc -X 5 -x proxyhost:1080 %h %p' -p22 username@serverhost
问题似乎是我的代理主机需要用户名和密码,我看不到如何在 ProxyCommand 中传递 user/pass。
您需要将用户名和密码传递给nc
command,谁在做您的代理。关于它的所有内容都写在 ncat(1)
:
--proxy-auth user[:pass]
(Specify proxy credentials) .In connect mode, gives the credentials that will be used to connect to the proxy server. In listen mode, gives the credentials that will be required of connecting clients. For use with --proxy-type http, the form should be user:pass. For --proxy-type socks4, it should be a username only.