Report this

What is the reason for this report?

I have a brand new droplet but ssh keeps resetting my connection

Posted on December 28, 2025

$ ssh do
Connection closed by 134.199.185.111 port 22 [ettinger@wiley]:➜ ~ $ ssh do Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.8.0-90-generic x86_64)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

As we discussed on Discord, I think that this is very likely SSH MaxStartups throttling, not a broken Droplet. You mentioned that your new Droplet us getting hit by a lot of SSH bot traffic, so I think that sshd will start randomly dropping connections during key exchange when too many unauthenticated connections are in progress. That’s why retrying a few times eventually works.

You can confirm this by checking /var/log/auth.log for messages about dropped connections during startup.

Quick fix is to raise the limit in /etc/ssh/sshd_config, for example:

MaxStartups 30:30:100

Then restart sshd.

A more effective long term fix is to move SSH off port 22, which stops most bot traffic entirely. After that, the random resets usually disappear.

Heya, @anthonyaxolotl

One additional thing worth checking, especially on a brand-new Droplet, is whether sshd is dropping connections due to unauthenticated connection throttling, rather than a networking or provisioning issue. This can happen very early in the SSH handshake and can look like random connection resets.

If the Droplet is receiving a lot of automated SSH scans (very common on new public IPv4 addresses), sshd may start rejecting or closing connections once too many unauthenticated sessions are in progress. When that happens, retrying a few times often works, which matches the behaviour you’re seeing.

You can confirm whether this is happening by checking /var/log/auth.log for messages indicating dropped connections during startup or key exchange.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.