Question

I cannot access my Droplet through SSH from Mac OS terminal

Access via Droplet console works well. Any attempt logging via SSH user@ip.x.x.x produces error : Permission denied (publickey). I have regenerated SSH, again, uploaded via Droplet console. Works well through droplet access but does not via Terminal from Mac. No idea how/where to move forward.

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.

KFSys
Site Moderator
Site Moderator badge
September 14, 2022

Hi @maximcrab,

This means that your Terminal is not using the said SSH key you’ve provided your Droplet with.

You need to create an SSH key on your Mac Terminal and using the Droplet Console add it to your droplet in /root/.ssh/authorized_keys then try again.

Additionally, check your sshconfig on your Mac ~/.ssh/sshconfig and see if you haven’t specified a different place for your identity_file/sshkey.

Yes, unfortunately, the same error: Permission denied (publickey).

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up