How to revert to password login from ssh key login for root

Hello, I was working to add a new user on our droplet, and I accidentally disabled the root user ssh key login. Is there a way to revert back to password login for the root user? If I set PasswordAuthentication to yes in sshd_config and restart ssh, it still asks for the password for the SSH key when I login with root.

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.

Hello, @avebury

In order to enable the password level authentication, you need to set the PasswordAuthentication to yes in /etc/ssh/sshd_config

Once this is done you can restart the ssh service and give it another try. You can also check the value of PubkeyAuthentication in the sshd_config as well.

If you’re still getting the prompt the passphrase for your ssh-key you can make sure that you connect to the droplet without specifying the use of an ssh-key in your ssh client.

Also, the droplet default setting is the PasswordAuthentication in case you do not have any ssh-keys configured.

If you want to authenticate using an ssh-key you can disable the PasswordAuthentication by setting it to no and make sure that your ssh-key is also present in the ~/.ssh/authorized_keys file.

Regards, Alex