Question

My droplet suddenly stopped allowing me to login in any way, except console.

Posted December 11, 2019 428 views
Linux BasicsLinux CommandsUbuntu 18.04

My main droplet is hosting a few websites.

But today, suddenly (perhaps when I ran this command: “sudo update-rc.d nginx enable”) it stopped allowing me to login thru FTP or thru Bash/Terminal altogether. (FTP gives error: “server refused our key” even though I was logging in for a long time, and didn’t change any keys etc).

Now I’m only able to login thru Console.
And the same password, which I’m using in console, isn’t working in bash terminal login.

Kindly help me, I’m comparatively new and my very imp websites are running on this droplet.
I know all about ssh keys, their security permissions, WinScp etc.
I’ve even checked my /etc/ssh/sshd_config file, and its all ok.

What can I do now so that it let me login normal way.
Pls pls help.

edited by bobbyiliev

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.

×
1 answer

Hello,

I could suggest checking a few things:

  • Check if SSH is running:
systemctl status sshd
  • If it is not running then you could start it with
systemctl start sshd
  • If this is not the case make sure to check if the service is listening on the default port, if not you might have to connect to that port that the service is listening on:
netstat -plant | grep -i ssh
  • Check if your key actually matches the one that you are trying to connect with, your public key is stored at the ~/.ssh/authorized_keys file, using the cat command check the content of the file and make sure that it matches with your public key:
cat ~/.ssh/authorized_keys
  • If not, you could follow the steps here on how to regain access to your droplet:

https://www.digitalocean.com/docs/droplets/resources/lost-ssh-key/

Let me know how it goes!
Regards,
Bobby

Submit an Answer