Unable to SSH into my Digital Ocean Droplet
It’s been a few years since I logged into my Digital Ocean Droplet. I had kept one around to keep a old Wordpress site that I have been too lazy to turn into Astro. I tried SSHing into the server by doing:
ssh root@200.189.70.22
I got the error:
root@200.189.70.22: Permission denied (publickey).
I wanted to self host Plausible since Google Analytics 4 is too much of a pain and PostHog seemed a bit overkill for me. I just want to see if I’m getting traffic and what the referring domains are.
I had started following these instructions from flaviocopes, and realized I had forgotten that I needed to add a new SSH key to my Digital Ocean account since I got a new computer. I went to my web console and added a new key from my ~/.ssh/id_ed25519.pub
file.
Tried to SSH in again and it didn’t work. Found this article and followed the steps. Turns out the web interface wasn’t adding the key to the droplet machine’s ~/.ssh/authorized_keys
file.
So what I had to do was reset my root password, login through the recovery console, allow for password authentication again, then add the new public key to the authorized_keys
files and turn back off the password authentication. That got everything working again.
You can find this screen by clicking on your Droplets menu on the left, and then clicking on the “Access” menu. In case that helpful article gets deleted somehow, here is the saved version from the wonderful Archive.org.
After all that, I decided to host my Plausible instance on Hetzner. It’s cheaper. Read my next post for instructions on how to get that running for $5/month.