How to keep persistant SSH sessions?

Solution 1:

I suspect that autossh, possibly with a little bit of scripting to automatically reconnect to the screen session, will be the way to go.

Solution 2:

I've never used it myself, but if I remember my hearsay correctly, Putty Tray will do that http://putty-tray.en.softonic.com/

Please comment if I'm wrong and leading John down the wrong path.

Solution 3:

You could consider running ssh in a wrapper script.

#!/bin/sh
while ! ssh "$@"; do
   echo "Reconnecting..." >/dev/stderr
done

Call the script "ssh-forever" and use it with, for example:

$ ssh-forever -t user@host screen -DR