Bug: Error reading SSH protocol banner
This is happening due to too many sends being in the unauthenticated state at the same time. One thing that can be done to mitigate this is to add a random start delay in each send process - I don't want to have to tweak the sshd config on the other end as this is kind of against the spirit of things.
Things that have been tried so far that make no difference - adjusting banner_timeout on the SSH client to 120 and introducing an auth_timeout. I will leave these in place as this is probably good for when a server is just a bit overloaded, but the way sshd works is it starts probabilistically rejecting connections when there are more than 10 unathed at the same time, so the connection gets dropped and no timeout will help.
I could introduce a reconnect, which is probably a good thing to be doing anyway, as there could be a variety of reasons for a connection to fail.
I am leaving the code as is for now though as the most annoying part of this is that the error does not appear to be being caught by any of the exception handling - this should count as a send fail and I should be getting an email, so something is fucked somewhere along the line.