I have an expect script that interrogates several hundred unix servers for both access and directories therein using "ssh user@host ls -l /path". The combination of host/path are unique but the host may be interrogated multiple times if there are multiple paths to test.
The expect script is run from a wrapper script that reads thru a file containing the host/path pairs. When I spawn off the expect script in the background without waiting for completion the result are, in some cases, quite different from when the expect script is run one at a time.
The error encountered when spawning off many expect scripts is "ssh_exchange_identification: Connection closed by remote host" which never happens when the expect script is run sequentially with implied wait.
Is the problem that a given server is being hit too fast with multiple ssh connection attempts or something else?
Any and all thoughts appreciated.
twk