Created
August 19, 2013 03:15
-
-
Save cloudchen/6265497 to your computer and use it in GitHub Desktop.
autossh wrapping remote ssh port forwarding
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
#Explanation of key parameters | |
#autossh -M<LocalListenPort> -f -q -N -R <RemoteIP>:<RemotePort>:<LocalIP>:<LocalPort> RemoteHost | |
#Example | |
#Forward local network port 22 of 10.128.42.134 to remote network port 7000 of 192.168.1.2 via ssh connection of example.org | |
autossh -M20000 -f -q -N -R 192.168.1.2:7000:10.128.42.134:22 example.org | |
#After connection is established by local network, you can run | |
#ssh -p 7000 192.168.1.2 | |
#from remote network environment to connect 10.128.42.134:22 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment