Handling of failed connect()s when ssh-agent is busy

Jos Backus josb at cncdsl.com
Tue Feb 13 07:13:42 EST 2001


On Mon, Feb 12, 2001 at 07:27:19PM +0100, Gert Doering wrote:
> To my knowledge, no - if the socket exists, but nothing is there,
> ECONNREFUSED *is* the error message to be returned...

Bummer. Sounds like a protocol deficiency to me, not being able to distinguish
between these two situations.

> What I'd do is to try, say, 10 times, with a random delay in between,
> something like "10-20 ms" or so - to give the agent time to recover if too
> many ssh clients are beating onto it.  If it didn't work in 10 times, give
> up.

Yes. There are three parameters involved:
- The ssh-agent listen queue depth, currently set at 5.
- The maximum number of contact attempts ssh makes (default=1).
- The (randomized) sleep period (default=don't sleep).

These together determine how many ssh sessions can be run at the same time.
It would be great it these were build-time configurable. This could be done in
such a way that the current behavior is still the default, i.e. 5, 1, 0 (no
delay).

I'm sure other people deploying ssh for mass-distribution are running into the
same problem, so this would be useful to them as well. I can come up with a
patch if needed.

Thanks,
-- 
Jos Backus                 _/  _/_/_/        "Modularity is not a hack."
                          _/  _/   _/                -- D. J. Bernstein
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;





More information about the openssh-unix-dev mailing list