Last active
April 25, 2016 23:05
-
-
Save ericfourrier/07159123b9008c7951ec to your computer and use it in GitHub Desktop.
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
# You need a server acessible from the client and server (aws instance for example accessible on port ssh 22 ) | |
# install autossh ( apt-get install autossh) | |
# on the local machine (raspberry pi ) | |
autossh -M 10001 -f -N -R 10000:localhost:22 user@serverip | |
# -n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background | |
# -N Do not execute a remote command. This is useful for just forwarding ports | |
# -T Do not allocate a pseudo-tty on the remote system | |
# -R Set up the tunnel as a reverse tunnel. | |
# on the server : | |
ssh -p 10000 root@localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment