Hi,
Whenever I create a Debian 10 Droplet, I am able to access root using my SSH key just fine. But when I need to setup a non-superuser account and SSH to it, using this guide by DigitalOcean, it keeps on telling me that “Permission denied (public key).” I have followed every step of this guide. I have tried this solution posted here before, but PasswordAuthentication is off for me. You can see my sshd_config here. Can anyone please help me?
Thank you.
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!
I think DigitalOcean updated the image, because the issue fixed itself recently.
Hello, @amirehmarwan
If you’ve added/copied the .ssh folder into the non root user’s home directory as mentioned in the article:
cp -r ~/.ssh /home/sammy
chown -R sammy:sammy /home/sammy/.ssh
This should work fine. However you can try to ssh by adding -vvv to your ssh command in order to get/receive a more verbose output, e.g:
ssh -vvv user@DropletIP
The provided output should help you to find out why the connection is failing and then we can further troubleshoot the connectivity issue.
Let me know how it goes.
Regards, Alex
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.