Ask HN: moving beyond screen to persist SSH sessions?
https://news.ycombinator.com/item?id=475148I work from my laptop, and my laptop is constantly moving between my home, cafés, libraries, schools, etc. I have SSH windows open and I want them to simply stay open and work all the time. I want the session to automatically persist changes in wireless networks, temporary lack of network connectivity, putting my laptop in suspend, etc. I also want my SSH-forwarded ports to keep being forwarded as long as I'm connected to the internet. It's such a huge pain to constantly re-login to all my SSH windows on every minor blip of connectivity.
Is there any way to accomplish this in any OS? Every time I have posted this problem elsewhere, everyone shouts "screen!" but I think the HN audience understands that while screen is cool, it doesn't even come close to resolving this issue; so I'm hoping for a better answer here.
To give an example of my problem:
Let's I have 5 SSH windows open doing various things (perhaps I am running top, emacs, a window that i'm using to type svn commands, etc). I also have port-forwarding set up so that I can use Firefox securely through a SOCKS proxy, and access websites that are only available from behind the SSH machine.
If my wireless network switches or even drops for 1 second, I now have 5 dead SSH sessions. I have to somehow reinitialize them, and when I do it's a mess to get them back in the correct state. I can solve the latter with screen. How can I solve the former automatically, without wasting time re-establishing those connections?