behaviour of ssh/scp over flakey links - timeout/retry?

carl at bl.echidna.id.au carl at bl.echidna.id.au
Thu Dec 13 12:19:16 EST 2001


I'm using OpenSSH's ssh and scp to back up some remote
machines, roughly as follows :

ssh remote-host "tar up a few dirs"
scp remote-host:tarfile local-repository

On the whole, as I'd expect, this works just fine.
But .. sometimes the link is a bit dodgey (for lack of
a more explicit term, this being a polite list :) )

Can anyone tell me how ssh and scp timeout and retry, or if they
do, during a session (I know about timeout and retry during
establishment, it's documented in the man page).  The job's
scripted, and I need to be able to make my script deal with a loss,
by as a minimum, alerting me that it's happened.  At the moment,
it seems to just hang when its lost the link.  I could use 
expect I guess, and catch timeouts that way, but I'd prefer if
ssh said "timeout on session, giving up" or something.

FWIW, we're using OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090600f
on RedHat 7.1 and 6.2.

I'll be updating to 3.0 "soon", once I've had a chance to test it in
our environment.

Thanks :)

Carl




More information about the openssh-unix-dev mailing list