The following command will initiate a ssh tunnel and daemonize itself restarting the connection if it drops for any reason:

autossh -f -M 20000 -i /home/user/id_rsa -D 12345 [email protected] -N

More examples of using autossh to do this can be found here:)

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview