reconnect ssh connection?

Paul Haas paulh at
Fri Jan 31 03:23:18 EST 2003

On Tue, 28 Jan 2003, David Garamond wrote [twice!]:

> has someone come up with a trick to let disconnected ssh connections be
> recovered without terminating and having to restart rsync (perhaps by
> wrapping ssh or something)?

Maybe my google skills are lacking, but I couldn't find anything.

Both Xvnc and screen support reconnecting interactive sessions, so there's
no reason we couldn't do the same sort of thing for ssh.  It's a bit more
complicated because we need to save the state at both ends.  We also need
some different options, how often to try to reconnect, when to just give
up, what ways to try to connect, etc...

Performance isn't much of an issue, since we'd only need it for unreliable
networks, and those are usually the slow ones.

Would rsync do anything odd if a network write took 4 hours?  The wrapper
around ssh would prevent rsync from seeing any errors, but it wouldn't
hide the timing.  Are there any timeouts in rsync?

Assuming it hasn't already been done, my thought would be to see how
screen works and model the remote end on it.  The local side would be a
mirror of the remote end with the addition of some code to (re)start and
end sessions.

If I wrote it, the wrapper would be GPL'd, so I can freely borrow code
from screen.


More information about the rsync mailing list