Link: Automatically restart SSH sessions and tunnels Using Autossh

autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic.

Automatically restart SSH sessions and tunnels Using Autossh (Ubuntu Geek)