By mdixon18
Hi,
I’ve added a new SSH Key that I got from my second computer into ~/.ssh/authorized_keys, so now online 1 I have to key for my laptop and line 2 the key for my iMac.
I then restarted the service sudo service ssh restart, this worked fine. I’ve even tried rebooting the entire droplet.
Now when i try to SSH in from my iMac ssh root@ip.address , I am prompted for my root’s password which I insert and I get a Permission denied, please try again error.
I’ve also tried:
cat ~/.ssh/id_rsa.pub | ssh root@[your.ip.address.here] "cat >> ~/.ssh/authorized_keys"
However again, i’m prompted to insert my password and again given the permission denied error.
How can I resolve this?
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!
It could be the key is not being read, but you would need to review the verbose output of your ssh command using the code:
ssh -v root@x.x.x.x - /path/to/key_file
You would want to replace the /path/to/key_file with the actual path to your SSH key file.
If you continue seeing issues with it, you might want to open a ticket with us so we can help look into this further for you.
Hope it helps! Jason Colyer DigitalOcean Platform Support Lead
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.