Created
February 21, 2012 14:14
-
-
Save zxkane/1876750 to your computer and use it in GitHub Desktop.
automatically create ssh tunnel to forward port
This file contains hidden or 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
ssh -q -N -o stricthostkeychecking=no -R 10002:localhost:22 -R 5900:localhost:5900 -R 6500:localhost:6500 [email protected]& |
This file contains hidden or 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
/usr/lib/autossh/autossh -M27002 -q -N -o stricthostkeychecking=no -R 10002:localhost:22 -R 5900:localhost:5900 -R 6500:localhost:6500 [email protected]& |
This file contains hidden or 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
su mylinuxaccount -c "export AUTOSSH_POLL=300;export AUTOSSH_GATETIME=0;/usr/lib/autossh/autossh -M27002 -q -N -o stricthostkeychecking=no -R 10002:localhost:22 -R 5900:localhost:5900 -R 6500:localhost:6500 [email protected]&" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment