haslamx
By:
haslamx

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

April 7, 2016 1.6k views
Networking Ubuntu

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

1 Answer

I've fixed this by adding:

ClientAliveInterval 60 to etc/ssh/sshdconfig
ServerAliveInterval 60 to etc/ssh/ssh
config

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

Have another answer? Share your knowledge.