Report this

What is the reason for this report?

SSH logged out too frequently

Posted on November 8, 2025

Hi, I am experiencing too many disconnections from my ssh giving me this message :

client_loop: send disconnect: Broken pipe

Sometimes I don’t even have the time to write even one command.

I tried to recreate droplets I have a private key encoded in ed25519.

Does anyone experience the same ?



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.

Heya,

This usually happens due to your network dropping packets, or the server is closing the connection due to inactivity/keepalive settings.

Quick fixes

On your local machine (~/.ssh/config):

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3

On the server (/etc/ssh/sshd_config):

ClientAliveInterval 60
ClientAliveCountMax 3

Then restart SSH: sudo systemctl restart sshd

Quick test: If it happens immediately (can’t even type one command), check:

  • Your ISP/network stability
  • Firewall rules blocking the connection
  • Try from a different network to isolate the issue

The keepalive settings ping the connection every 60 seconds to prevent timeout. Start with the client-side fix first.

Heya, @1df3f80dad3e4c5ba4ff025fbf7021

This will mainly happen due to poor internet connectivity or if your network frequently drops packets. You can ensure your internet connection is stable, e.g if on Wi-Fi, stay in a good range and etc.

Regards

I think that usually happens when your SSH session is idle or the network drops briefly. Try adding this to your local SSH config (~/.ssh/config):

Host *
  ServerAliveInterval 60
  ServerAliveCountMax 3

This keeps the connection alive. If it still happens, check your network stability or firewall timeouts.

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.