Skip to content

Instantly share code, notes, and snippets.

@pascalc
Created November 12, 2017 13:34
Show Gist options
  • Save pascalc/b27313784e04e8e309395d592792f3bb to your computer and use it in GitHub Desktop.
Save pascalc/b27313784e04e8e309395d592792f3bb to your computer and use it in GitHub Desktop.
SSH Remote Port Forwarding
ssh -nNT -R <remote-port>:localhost:<local-port> -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" user@example.com

This will forward local-port (from localhost) to remote-port on example.com, and set options to keep the connection alive

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