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?