2
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?
1Try to set
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. – Queeq – 2019-09-17T10:11:04.5971
Possibly helpful: https://edoceo.com/notabene/ssh-exchange-identification
– Shayaan – 2019-10-01T19:06:40.647Thanks for the link, but all of those (except heavy load - which is not the problem) are for seeing this error every time, as opposed to occasionally, as I have been seeing it. – David Ljung Madison Stellar – 2019-10-10T22:40:14.743