Connect to remote host using a SOCKS proxy If we have Tor service running locally or any other SOCKS service available at 9050 port on localhost, then we can go like this: ssh -o ProxyCommand='nc -x 127.0.0.1:9050 %h %p' user@server.com