Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davedavis/86187e6965ef7cae42a3791ee399ecc1 to your computer and use it in GitHub Desktop.
Save davedavis/86187e6965ef7cae42a3791ee399ecc1 to your computer and use it in GitHub Desktop.
Create a reverse SSH tunnel
FROM INTERNAL:
ssh -R 12345:localhost:22 dave@externalserverIPaddress
That’ll set up a reverse SSH tunnel from your external server (listening on port 12345) to your internal server
Then SSH to your external server when you’re at home and then connect through the tunnel by running :
ssh dave@127.0.0.1 -p 12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment