Skip to content

Instantly share code, notes, and snippets.

@dejisec
Last active July 15, 2020 19:57
Show Gist options
  • Save dejisec/3f36d1958a37db77ccba5c4d6792baf4 to your computer and use it in GitHub Desktop.
Save dejisec/3f36d1958a37db77ccba5c4d6792baf4 to your computer and use it in GitHub Desktop.
SSH Tunnels and Pivots

sshuttle

sshuttle -vvr [email protected] 10.1.1.0/24

Local port forwarding

ssh <gateway> -L <local port to listen>:<remote host>:<remote port>

Remote port forwarding

ssh <gateway> -R <remote port to bind>:<local host>:<local port>

Dynamic port forwarding

ssh -D <local proxy port> -p <remote port> <target>

Plink local port forwarding

plink -l root -pw pass -R 3389:<localhost>:3389 <remote host>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment