Connecting to my server has never been a problem. But now I've added a mesh router in bridge mode to my regular router, and when I try to ssh to my server, sometimes it works fine, and other times the connection is closed at initiation with:
kex_exchange_identification: Connection closed by remote host
This is only when I am first trying to connect - on the times it succeeds in connecting, it stays connected just fine.
It also seems to fail more often with scp than ssh, which I find odd, but could just be my own non-statistical impressions...
I'm guessing the bridge mode is randomly getting in the way of the ssh and killing the connection, any thoughts?
LogLevel DEBUG
on the server in/etc/ssh/sshd_config
and seeauth.log
for clues. I've been troubleshooting a problem with the similar symptoms just now and it turned out to be dropping connections due toMaxStartups
limits, which was clearly seen in the debug log.