Reconnect possibilities (was Re: telnet and SIGHUP)

Fairlight fairlite at fairlite.com
Thu Jun 17 16:50:41 PDT 2004


Confusious (Bob Rasmussen) say:
> This topic brings to mind an idea I have kicked around for some time.
> Suppose I have telnetted or SSH'd into a Linux/Unix server over a wireless
> access point from my laptop. I move around the office complex, and lose my
> connection.
> 
> At some point later I link up with a new WAP, maybe get a new IP address,
> and then connect back in to the same server. What I WANT is to be able to
> reconnect to my previous session, which has been carefully suspended at
> the point of the disconnect. Of course, authentication would have to take
> place.
> 
> I believe I could create a protocol for doing this, and modify the SSHD
> program from, say, OpenSSH.
> 
> Does anyone know another, existing approach?

ftp://ftp.gnu.org/pub/gnu/screen/

man screen

Use 'autodetatch on' in the screenrc.  When you log back in, use `screen -r`
or if it still thinks it's connected, you can use `screen -Dr` to detach
and reattach.  Actually, you can use -Dr to do that when you just have it
up on one system, go to another, and want to switch which system your
session is attached to.  I used to be logged in on a terminal at home and
then reattach at work or vice versa--you just take your session over
wherever you are.

All processes continue run in the background even when it's detached, even
if they're realtime interactive.

Besides being a multiplexor, this is one reason I use a local linux box
here--I run all my sessions to that system on the wireless over screen, but
also run my connections out to the shell server through that as well.  If
ever I get dumped, I just log back in and reattach and it's like I never
dropped.

In the case as the OP had where the system still believes you're logged in,
you would use -Dr since it never got a HUP telling it to autodetach, but
you can still detach and reattach to pick up where you left off.

The only thing it won't protect you from is a system reboot, but what will?

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list