Created
November 13, 2022 17:36
-
-
Save hosni/5e0347cc8b99e44791e64bc46f54ae80 to your computer and use it in GitHub Desktop.
ssh using socks5 proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We need to use ProxyCommand option of ssh client like this: | |
`ProxyCommand /usr/bin/nc -x SOCKS5_PROXY_HOST:SOCKS5_PROXY_PORT %h %p` | |
The ssh command is something like this: | |
ssh SSH_USER@SSH_HOST -o "ProxyCommand /usr/bin/nc -x SOCKS5_PROXY_HOST:SOCKS5_PROXY_PORT %h %p" | |
for example: | |
ssh -T [email protected] -o "ProxyCommand /usr/bin/nc -x 127.0.0.1:9050 %h %p" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment