Added another SSH key to my droplet, now it keeps asking to reset root password
So, I got a new computer, and I wanted to set it up so I could connect to an existing droplet of mine. I have previously set up my other computer to connect to the droplet with SSH.
To connect my new machine, I followed the instructions from this article, specifically this part:
In order to add additional keys to pre-existing droplets, you can paste in the keys using SSH:
cat ~/.ssh/id_rsa.pub | ssh root@[your.ip.address.here] "cat >> ~/.ssh/authorized_keys"
Afterwards, it said the IP had been added to my list of known hosts, then asked for my password (which I had reset earlier).
It then said:
WARNING: Your password has expired.
Password change required but no TTY available.
Figuring I just needed to reset it on my older machine, I switched to it, and attempted to connect. It connected, and asked me to reset my root password. I did, it logged me out, I reconnected… but it asked me to reset my root password again.
Now every time I try to connect on my original machine, it gets me to reset my root password. On my new machine, I can’t connect at all because it doesn’t seem to recognize any of the new root passwords I set!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.