SSH tunnel between two NATed machines via a third SSH host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Useful for when you need to have two hosts talk to each other on a specific port but they're both NATed (behind routers). | |
For example, you want to be able to SSH into your friend's machine to pair program with them. | |
remote$ ssh -R 55555:localhost:22 myaccount@my_ssh_server.com | |
local$ ssh -L 55555:localhost:55555 myaccount@my_ssh_server.com | |
local$ ssh -p 55555 localhost -l remote_user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment