Report this

What is the reason for this report?

ssh Server unexpectedly closed network connection

Posted on April 24, 2017

i’m trying to connect to my digital ocean Ubuntu 16.04 server through ssh and sftp using putty and winscp. But i get the error “Server unexpectedly closed network connection”.

I do have access through the digital ocean control panel.

anyone knows what to do in a situation like this?



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.

I had same problem. I did :

cd /etc/ssh chmod 400 *

What In don’t understand is why those files were with wrong chmod. ???

Hi @soerenfrisk Maybe you accidentally activated the firewall or have a too hard configuration of IPS like fail2ban? If you run this command in the console, what does it tell you?

sudo ufw status numbered

@soerenfrisk @jtittle But if you have access to console and you’re migrating to a new server, can’t you just run the scp commands in the console and then kill off the old server?

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.