SSH_DISCONNECT_CONNECTION_LOST
SSH_DISCONNECT_CONNECTION_LOST (10) indicates the SSH connection was lost unexpectedly. This is a generic network-level disconnect – the TCP connection dropped, a keepalive timed out, or the network became unreachable while the session was active. Not typically sent in a clean disconnect; it appears in logs when the connection dies abnormally.
Code
10
Category
Disconnect
Standard
RFC 4253 §11.1
Description
SSH_DISCONNECT_CONNECTION_LOST is the disconnect code for unexpected connection termination. Unlike clean disconnects (code 11, BY_APPLICATION), this code appears when the connection died for reasons beyond the application's control.
In practice, this code is often generated by SSH clients logging the reason for connection loss rather than received as an explicit disconnect message. When a TCP connection drops without a clean FIN (e.g., network partition, NAT table expiry, remote host crash), the SSH layer eventually detects the loss via keepalive timeout and logs or reports code 10.
OpenSSH's ServerAliveInterval and ServerAliveCountMax settings control how long an SSH client waits before declaring the connection lost. Cloud instances behind NAT commonly have their SSH connections dropped by idle NAT table entries, which triggers code 10 after the keepalive timeout expires.
Common Causes
- –TCP connection dropped without clean FIN (network partition, remote crash)
- –NAT table entry expired while SSH session was idle
- –SSH keepalive timed out waiting for response from server
- –Network interface went down while session was active
- –Cloud instance lost network connectivity