Skip to content
MtrXTools

Connection closed by 203.0.113.10 port 22

The SSH server ended the session

Seen in OpenSSH client, git over SSH

The server closed the SSH connection, usually during the handshake or authentication, without giving the client a reason.

Common causes

  • The server rejected the user or source address (AllowUsers, DenyUsers, fail2ban, hosts.deny).
  • Authentication failed and the server dropped the session.
  • sshd hit MaxStartups under load or a brute-force attempt and refused new sessions.

How to fix it

  1. Run ssh -vvv user@host to see the last step before the close.
  2. Check the server log (journalctl -u ssh or /var/log/auth.log) for the matching entry.
  3. If you are banned by fail2ban, unban your IP: fail2ban-client set sshd unbanip <ip>.

Got a different message? Paste it into the error explainer.

Related errors

All 31 Dev tools & SSH errors