Skip to content

Instantly share code, notes, and snippets.

@jw-foss
Last active June 24, 2021 10:15
Show Gist options
  • Save jw-foss/3d0d25ebaf2087d59d84aa3908feb7c7 to your computer and use it in GitHub Desktop.
Save jw-foss/3d0d25ebaf2087d59d84aa3908feb7c7 to your computer and use it in GitHub Desktop.
proxy ssh connection
# SSH connection is under raw TCP and UDP, which was implemented in `ssh` command via `nc` or `socat` for different platform
# So that in order to connect to the server via proxies, we need to as these commands to do that for us.
# Use `man nc` or `man socat` for more detail.
# Put this into `/Users/username/Home/.ssh/config`
Host git.github.com
# ProxyCommand does the magic to access the proxy server.
ProxyCommand /bin/nc -X 5 -x 127.0.0.1:7890 %h %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment