Question

Yet another "Permission denied (publickey)" issue

Hi all,

I am trying to SSH from OSX to my Ubuntu droplet.I have checked to make sure my public SSH keys match up and I have already gone through the process of a full reinstall. I’ve also applied

chmod -R go= ~/.ssh chown -R $USER:$USER ~/.ssh

logged out and then back in. Nothing works. I’m thankful the browser CLI is available but, I need to use a local terminal. Any advice welcome.

Many thanks. Aaron.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@alexdo @baraboom,

Many thanks for that. I’ve done everything you suggest (while getting stuck in the console caps lock loop) and still get stalled at:

Permission denied (publickey, password)

I’ve deleted all the ssh keys from my machine and generated new ones and then followed: Manually from the Droplet without Password-Based Access instructions.

No matter what I do I can’t access the server with the password I supplied or keys. I’ve toggled PasswordAuthentication in sshd_config both ways and still no luck.

Looking online I see many others have a similar issue with remote login to DO droplets. The supplied documentation offers many possibilities but no straightforward path to basic function. Does DO offer paid direct support? I need to get this working soon otherwise I’ll need to try a different supplier (I don’t want to since I’ve already invested a bunch of time getting my Ubuntu server installed with the SW I need via browser CLI)

Kind regards,

Aaron

Hi, @aalborz2020

Do you have multiple SSH keys on your machine? If that is the case have you tried to specify the exact key to connect to your DO droplet.

If you have multiple SSH keys, you may need to specify the path of your private key using the -i flag, as in

ssh -i /path/to/private/key username@203.0.113.0

Make sure to substitute the path to your private key.

As @baraboom already mentioned you can double check our existing tutorial on how to use ssh keys with DO droplets:

https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/

and https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/openssh/

Hope that this helps! Regards, Alex

Hello, @AaronDay

If you have multiple SSH keys, you may need to specify the path of your private key using the -i flag, as in

ssh -i /path/to/private/key username@203.0.113.0

Make sure to substitute the path to your private key.

As @baraboom already mentioned you can double check our existing tutorial on how to use ssh keys with DO droplets:

https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/

and https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/openssh/

Hope that this helps! Regards, Alex