Skip to content

Instantly share code, notes, and snippets.

@drmats
Created November 22, 2017 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drmats/ffcd803105733dfb8b82f63895529694 to your computer and use it in GitHub Desktop.
Save drmats/ffcd803105733dfb8b82f63895529694 to your computer and use it in GitHub Desktop.
SSH tunnels
# Reverse Tunnel
ssh -R *:REMOTE_LISTEN_PORT:localhost:LOCAL_LISTEN_PORT user@remotehost -p PORT -N -C -q
# Socks (v5) proxy
ssh -D 9150 user@remotehost -p PORT -N -C -q
# Fork and quiet
-f -q
# /etc/ssh/sshd_config
GatewayPorts yes
# Jump Host connection
ssh -J user@jumphost:port user@destinationhost -p PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment