You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

OCI: sftp or ssh Connections Failing With "ssh_exchange_identification: Connection closed by remote"

edited Feb 3, 2025 9:30AM in Linux

Applies To:

Oracle Cloud Infrastructure
Linux OS

Symptoms:

Intermittently unable to ssh to the server. The following error shows:

# ssh server.example.com
ssh_exchange_identification: Connection closed by remote host.

Cause:

Too many connections trying to authenticate simultaneously, surpassing the MaxStartup value in /etc/ssh/sshd_config.

As per sshd_config(5) manual page:

MaxStartups
Specifies the maximum number of concurrent unauthenticated connections to the SSH
daemon. Additional connections will be dropped until authentication succeeds or the
LoginGraceTime expires for a connection. The default is 10:30:100.

Alternatively, random early drop can be enabled by specifying the three colon sepa‐
rated values start:rate:full (e.g. "10:30:60"). sshd(8) will refuse connection
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!