ssh refuses to connect after upgrading to Big Sur

Attempting to ssh into my mini—which worked under 10.15 without fail—now either fails with a timeout or produces the ever so unhelpful error "kex_exchange_identification: Connection closed by remote host”:


ssh -vvvvA username@hostname (actual username and host elided for privacy)                                                                                                                                                                                

OpenSSH_8.1p1, LibreSSL 2.7.3

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 47: Applying options for *

debug1: Connecting to hostname port 22.

debug1: Connection established.

debug1: identity file /Users/username/.ssh/id_rsa type -1

debug1: identity file /Users/username/.ssh/id_rsa-cert type -1

debug1: identity file /Users/username/.ssh/id_dsa type -1

debug1: identity file /Users/username/.ssh/id_dsa-cert type -1

debug1: identity file /Users/username/.ssh/id_ecdsa type -1

debug1: identity file /Users/username/.ssh/id_ecdsa-cert type -1

debug1: identity file /Users/username/.ssh/id_ed25519 type 3

debug1: identity file /Users/username/.ssh/id_ed25519-cert type -1

debug1: identity file /Users/username/.ssh/id_xmss type -1

debug1: identity file /Users/username/.ssh/id_xmss-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_8.1

kex_exchange_identification: Connection closed by remote host


Any ideas? Searching on the Web has been unhelpful.

Mac mini, macOS 11.0

Posted on Nov 27, 2020 5:45 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 14, 2020 3:51 PM

Hey. I had the same issue, and it happened right after migrating everything to my new MacBook Pro.

I was under the impression that the .ssh folder files where affected or useless, but the keys and the configs were fine.


My problem was that I had not one but two softwares that were creating the issue. In your case may be something else, but in general check if you are using any proxy/vpn or network filter (like TripMode or AdGuard). For me it was the latter. I had AddGuard popping the kex_exchange_identification error. (I also had TripMode blocking the connection but that was an easy find)


Good luck!

Similar questions

1 reply
Question marked as Top-ranking reply

Dec 14, 2020 3:51 PM in response to Sevardin

Hey. I had the same issue, and it happened right after migrating everything to my new MacBook Pro.

I was under the impression that the .ssh folder files where affected or useless, but the keys and the configs were fine.


My problem was that I had not one but two softwares that were creating the issue. In your case may be something else, but in general check if you are using any proxy/vpn or network filter (like TripMode or AdGuard). For me it was the latter. I had AddGuard popping the kex_exchange_identification error. (I also had TripMode blocking the connection but that was an easy find)


Good luck!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ssh refuses to connect after upgrading to Big Sur

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.