kex_exchange_identification: Connection closed by remote host
The SSH connection was closed before the handshake — server overload, rate limiting, or a proxy/firewall interfering.
Seen on:
Git
Meaning
Often transient (server-side load or DDoS protection) or caused by networks that intercept SSH. Retrying or using port 443 helps.
Common causes
- Remote side rate limiting/overloaded
- Firewall/proxy intercepting SSH
- MaxStartups limit on a self-hosted server
⚡ Quick fix
- Retry after a moment
- Try SSH over 443
- Use HTTPS
Detailed fix by platform
Git
ssh -vT -p 443 git@ssh.github.com
How to diagnose
- Repeatable — Every time or intermittent?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026