ssh connect through sock5 proxy

This post provides a straightforward method to connect your ssh client through a local socks5 proxy.

It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:

ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name

If you are not using nmap’s netcat utility, you may try:

ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name

发表评论

电子邮件地址不会被公开。