By lilolme
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?
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!
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.
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.
Heya,
In such cases you need to make sure PasswordAuthentication is set to Yes. To do that, SSH to your Droplet and edit the sshd_config file, located in /etc/ssh/. Once you turn on PasswordAuthentication you need to restart the sshd service.
systemctl restart sshd
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.