screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reestablishing ssh connections via screen


From: Andrew Schulman
Subject: Re: Reestablishing ssh connections via screen
Date: Wed, 22 Jun 2005 16:01:09 -0400
User-agent: 40tude_Dialog/2.0.15.1 (78c51de7.204.366)

> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]