Skip to content

Instantly share code, notes, and snippets.

@syfun
Last active July 30, 2018 06:28
Show Gist options
  • Save syfun/fae8c68162ef52e0db1cc4dcac366de9 to your computer and use it in GitHub Desktop.
Save syfun/fae8c68162ef52e0db1cc4dcac366de9 to your computer and use it in GitHub Desktop.
ssh proxy

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment