Autossh

From LQWiki
Jump to: navigation, search

autossh

So maybe your having trouble keeping an ssh tunnel open for a program you want to secure. Lets say it's synergy, which uses port 24800. I recommend using autossh for this:

autossh -f -v -M 24800 -N -R 24800:localhost:22 remotehostname

Reason being that autossh will automatically restart the tunnel if something pesky wacks it.

There's some really awesome info on autossh here: autossh on Gentoo Wiki