1. socks5: 1080 ssh -oProxyCommand="nc -x 127.0.0.1:1080 %h %p" ubuntu@192.168.1.2 2. alias alias sshp="ssh -oProxyCommand=\"nc -x 127.0.0.1:1080 %h %p\"" 3. add config, like for github # ~/.ssh/config Host github.com ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p