# kex_exchange_identification: Connection closed by remote host

**Code:** `kex_exchange_identification` · **Category:** Git · **Seen on:** Git

The SSH connection was closed before the handshake — server overload, rate limiting, or a proxy/firewall interfering.

## 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

1. Retry after a moment
2. Try SSH over 443
3. Use HTTPS

## Detailed fix by platform

### Git

1. `ssh -vT -p 443 git@ssh.github.com`

## How to diagnose

1. **Repeatable** — Every time or intermittent?
2. **Recent change** — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/git/kex-exchange-identification)
