Celeb Glow
general | February 26, 2026

SSH troubles: ssh_exchange_identification/kex_exchange_identification: Connection closed by remote host

I am connecting to my hoster's server via ssh/scp, mostly from Linux machines, and things were working well for years.

Now, all of a sudden, the majority of all connection attempts fail before getting to the password prompt with the following errors (depending on the SSH client version):

> kex_exchange_identification: Connection closed by remote host
> Connection closed by xxx.xxx.xxx.129 port 22

or

> ssh_exchange_identification: Connection closed by remote host
> Connection closed by xxx.xxx.xxx.129 port 22

Some connection attempts work, though, and also keep a stable connection. This was confirmed with multiple clients:

  1. JuiceSSH on Android
  2. OpenSSH_8.3p1 on Linux (current)
  3. OpenSSH_6.0p1 on Linux (legacy, never updated)
  4. FileZilla

and from multiple networks. Nevertheless, my hoster keeps blaming my clients or my IP address.

Any advice how to track that down further? (Yes, I know I should switch from a hoster as incompetent as this one, but moving all the services would take me a week ...)

1 Answer

Try capturing an ssh debug (ssh -vvv ) and see what it tells you. You should see the kex exchange info which will tell you which kex algo's the server supports, which ones the client supports, and if successful, which one they agreed on.

It will also give you more information that might show exactly where the failure is.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy