I am spinning up multiple remote instances via Google Cloud and scp
-ing scripts to these instances to run them and get the results scp
-ed back to my local computer. Things start smoothly but after a while (about 30 instances later), new instances are unable to scp
files back to my computer as I get the error: ssh_exchange_identification: Connection closed by remote host
. This error only goes away after I reset my local computer's ssh with the following commands:
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
What is the underlying problem and how can I solve it to have this problem resolved without having to constantly reset my ssh?