can't log in via ssh all of a sudden (was working before)

January 7, 2018 972 views
Deployment Ubuntu

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?

1 Answer

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

Have another answer? Share your knowledge.