errors when running multiple openssh sessions

Frank Cusack fcusack at fcusack.com
Tue Jun 17 06:33:37 EST 2003


On Mon, Jun 16, 2003 at 01:21:07PM -0700, jcduell at lbl.gov wrote:
> ------------------------------------------------------------------------
> Openssh seems to fail sporadically if you issue lots of simultaneous
> ssh commands.  Take the following program:
> 
>     #!/bin/sh
> 
>     for NUM in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
>         ssh foo.bar.com echo $NUM &
>     done
> 
> So, we're running 16 ssh commands at once, each of which just prints out a
> different number.
> 
> When I run this program, several of the ssh commands fail with 
> 
>     ssh_exchange_identification: Connection closed by remote host
> 
> Interestingly, when I run 10 or fewer ssh commands, they all work OK, at
...
> This smells like some kind of race condition.

Sounds like a listen queue problem to me.  Try bumping the number in the
listen() call up to 25 and see what happens.

/fc




More information about the openssh-unix-dev mailing list