Logging in without ssh keys

Posted February 27, 2017 12.2k views
Linux BasicsUbuntuSecurityDigitalOcean

I set up one server with ssh keys. I could ssh into it with the keys but my colleague couldn’t so (somehow) I managed to create a login so that he could access it without providing the keys.

Now I need to create another brand new server with similar access but whatever I do the new server requires the key. Has something changed in the setup? The old server is still accessible with just the root password but the new one says “Permission denied (publickey).”

How can I give my colleague access with just root password?

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.

Submit an Answer
2 answers

Thanks but this is just an experimental server. Convenience is more important. In any case I can reset the root password or just blow away the server.

In any case, I found the solution. When setting up the server on Digital Ocean. The form for selecting the keys is quite misleading and cost me a couple of hours.

  • Don’t select any of the keys you might have created and DON’T select “Login”. (Even if you select just login, it actually seems to create a default ssh key and you cannot login without it. In this case you won’t get an email. I was doing this and then resetting the password but it wont work)
  • Then when you create the server, you will get an email with the password
  • Login and change the default password

use a user that doesn’t have a private key in their .ssh folder, because it’s trying to use your key since it found one in the default place. i would advise you disable password authentication though, and get your friend to make his own key pair and give you the public copy to put in his users home folder. allowing password logins is inferior to always using asymetric ciphers like keypairs are.