Can't connect via SFTP / SSH

Hi there,

I have a droplet configured with Ubuntu. It contains a Wordpress Installation (mysql, phpmyadmin).

I was able to connect via SSH / SFTP. Suddenly one day I was going to update some files in production and I was unable to connect via SFTP and SSH. It just closes my connection, even via Access Console from Digital Ocean Panel. I didn’t change configs or updated any root system file. I’ve tried with support but can’t get a decent question on how get this to work.

I’ve made a reset of the root password but as soon as I set my new password but as soon as I set my password… it happens again and i get instantly “kicked” out of the server.

I’ve tried to check if it was a network problem but it happens in different networks.

Any suggestions on how to get this to work again?

SFTP Error: Error: Received unexpected end-of-file from SFTP server SSH: Connection to ********** closed.


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.

Something to try when logging in via ssh since you mention you login using a password is to disable your ssh-agent - killall ssh-agent

Once this is complete try logging in again. If you are successful, then what is happening is your shell’s key agent has to many keys loaded. When you try and log into your server the agent tries those keys first which cause the login to fail.

If this does not turn out and the droplet is indeed compromised, you can use recovery mode to attempt to restore it or at the very least attempt to grab data from the droplet.

The fact that the resetting the password from Access Console is giving you the same result leads me to believe that your droplet may be compromised. Possibly due to the Wordpress, mysql, phpmyadmin, if they weren’t secured.

I would suggest spinning up a new droplet and see if the problem remains. If not, you know its an issue with the droplet in question.

Hopefully you don’t have any data that isn’t backed up on the droplet that you can’t access.