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.

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.

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).