OpenSSH with "resumable" functionality

Misha Koshelev misha680 at
Mon Apr 19 22:20:45 EST 2010

Chris Wilson wrote:
> Hi Misha,
> On Sun, 18 Apr 2010, Misha Koshelev wrote:
>> I was wondering if it might at all be possible to have the following
>> functionality in OpenSSH:
>> (i) upon "timeout" of connection (say 2-5 seconds) disconnect
>> (ii) keep trying to reconnect
>> (iii) upon reconnection, resume session exactly where started
> [...]
>> However, I am confused as to (i).
> It might reduce the confusion (yours and ours) if you defined exactly
> what you mean by "timeout"?
> If you mean "packet sent with no response from the remote side", you can
> do that (or something similar) with the TCPKeepAlive or
> ServerAliveInterval options to the client.
> You can do (ii) by wrapping the ssh command in a shell loop:
> while ! ssh user at host -o 'ServerAliveInterval 5' screen -d -RR;
> do true; done
> Cheers, Chris.

Thank you.

Not sure this will work with my intended application (NoMachine NX). Will have to think about it...

Also right now get..

Must be connected to a terminal.

Any ideas?

Thank you!

More information about the openssh-unix-dev mailing list