Question

Why does my SFTP connection keep disconnecting every 5 minutes? Network error: Software caused connection abort

I made a new droplet today (Ubuntu 14.04 LAMP image) and I’m having some trouble with my SFTP connections. Whenever I connect via SFTP (using root) I always get disconnected after about 5 minutes of inactivity. The client becomes unresponsive for around 15 seconds and shows this error:

Network error: Software caused connection abort

This happens on both WinSCP and FileZilla with the exact same error message. I have not edited any configuration files on the droplet or installed anything else apart from phpmyadmin.

How can I stop my SFTP sessions from disconnecting so often?

Tried adding “ServerAliveInterval 60” to ssh_config and restarted the ssh service but it didn’t make any difference


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I’ve fixed this by adding:

ClientAliveInterval 60 to etc/ssh/sshd_config ServerAliveInterval 60 to etc/ssh/ssh_config

Then restarting the ssh service. SFTP sessions are no longer timing out.