Re:Ask HN: moving beyond screen to persist SSH sessions?
by mightybyte on Tuesday February 10, 2009 @10:36AM
(#475272)
I don't think it's any more complex than running screen on the server, using SSH keys to allow you to connect to the server without a password, and possibly orchestrated with a small script that checks network connectivity and re-establishes your session after it's broken. Your 5 shells are running in one screen session on the server, so you don't have to restart all of them. It's just a simple "screen -D -R". If there is no existing screen session to attach to, you can have screen automatically create your sessions via the config file.
This is pretty much what I do already, except that I don't switch connections as frequently as you. But when I go to a new place, it's just connect with ssh and reattach with screen.
Re:Ask HN: moving beyond screen to persist SSH sessions?
by apage43 on Tuesday February 10, 2009 @10:49AM
(#475292)
If you don't care about connection dropping, indeed just set up key authentication and run ssh in a loop as described above, instead of a complicated VPN, which will only really partially mitigate dropping of -forwarded- connections.
Secondly, you should be able to set scripts to trigger when a network interface comes up in most linux distros, but how to do it varies, for example /etc/network/ifup.d/ in ubuntu.
Regarding the VPN, could this connection be automatically established upon joining a wireless network? (i think you see where i'm going with this question)