I am currently working with some SSH tunnels configured. Many times when I loose connection to the Internet or hibernate my laptop, I need to reconfigure the tunnels (i.e., do killall ssh and then set up the tunnels once again).What is the best way to automate it?
How can I configure Linux to reopen my SSH tunnels after the connection has been restored?
ssh;ssh tunneling
Sounds like autossh (Automatically restart SSH sessions and tunnels) could be something for you:http://www.harding.motd.ca/autossh/To keep tunnels alive, and to administrate them in general.Should be on most distros base repos, so just use one of the following:apt-get install autossh # debpacman -S autossh # archyum install autossh # rhel