By tiagobertolo
I followed this to try to add authorized keys to my droplet. I ended up loosing permissions in my starting machine and not being able to log in from the second machine either.
I could not type ‘~’ in the web console, so i am not able to authorize more keys either.
What can i do to overcome the: “Permission denied (public key).” error?
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!
Not sure if this is your problem, but it was mine! I didn’t realise that just because the root user had authorized_keys, doens’t mean all the other users created do. I.e. if you create a VPS and Digital Ocean automatically adds SSH keys, these only go to the root user, so you have to mkdir .ssh for your new user and copy the SSH keys there and make sure the permissions correct.
What are the authorized keys? The ones present in the ~/.ssh/authorized_keys file or the ones in the profile settings of my digital ocean account?
By logging in again i was able to chmod 600 my ~/.ssh/authorized_keys and paste there my public key. It still does not work.
PS: Can’t edit my question. How nice.
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.