Logging in without ssh keys

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?

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.

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.