> JCA wrote: >> Is it not the case that this would reconnect, but spawning a new >> shell? I would like to reconnect to the same shell, which might be >> running other applications. > > This is the typical way to use screen: > > - Turn on your laptop, open ssh connection to the server > - On the server: type 'screen' > - screen will give you a shell, just like when you log in normally > - Do work that you need inside that shell > - If you get disconnected, such as when you turn off your laptop, screen > will still be running on the server > - When you want to reconnect, turn on your laptop, and connect through > ssh to the server again > - type 'screen -D -R' to resume screen where it was before you turned > off your laptop. > > It is not possible to resume the exact SSH connection when you turn off > your laptop because networking doesn't work that way. Instead, you must > create a new SSH connection and then use screen to resume what you were > doing inside the screen session.
I think autossh (http://www.harding.motd.ca/autossh/) will do what you want. You can use it in conjunction with screen; it includes a sample script. _______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
