I set up an SSH key for my droplet 9 months ago when I started it, and have been logging in to my server from terminal using the root user with no problem. But today it suddenly stopped working. When I typed in the command:
ssh root@[ip.address]
It says “Permission denied (publickey)”.
I don’t know what went wrong. I don’t remember changing anything. But it just suddenly stopped working. Any ideas what the problem could be?
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 recently experienced the same (and fixed it). Reason: human error :)
I was fiddling with docker, and accidentally changed the ownership of my .ssh folder to docker:docker (I thought i was smart by symbolically linking /root/.ssh to /home/docker/.ssh)
Anyways, after setting the appropriate permissions/ownership of the .ssh-folder everything worked again. Hope this helps.
Have you recently deleted any files off your computer, you may have accidentally deleted your key. You can always just create a new one though if you SSH into your server using the password that you originally got then it should be all good
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.