Report this

What is the reason for this report?

I (really) need some help connected to SSH. (very new to this)

Posted on March 13, 2020
Iowa Packers

By Iowa Packers

Newbie

I have looked through the docs, followed the guides, but I am not sure what I am doing wrong. I created SSH two keys. One public and one private. They are in the root directory of my macbook. I uploaded the public key in the proper places on the dashboard. I tried running ssh root@ip but got “permission denied” publickey. Then I tried to specify the file using ssh -i /users/name/name-of-private-key userid@ip, but still. still… still… got “permission denied, publickey” This is the first step and I already feel like a failure. Please help. Thank you.



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!

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.

Hi there @IBP0,

There are a few things that I could suggest:

  • First make sure that your SSH key is set with proper file permissions:
chmod 600 /users/name/name-of-private-key

Note, change the /users/name/name-of-private-key with the actual path to your private key.

  • Then try to SSH again and if you still get the same error try running SSH with verbose mode by adding the -vvv tag:
ssh -vvv -i /users/name/name-of-private-key userid@ip

This should give you more information on what the problem could be.

  • Another thing that you need to keep in mind is that when you add a new SSH key to your DigitalOcean control panel it does not get added to any existing Droplets, this means that you need to create a new Droplet and select the SSH key during the creation process, or you need to follow the steps here on how to regain access to your existing Droplet in case that you are not able to connect:

https://www.digitalocean.com/docs/droplets/resources/console/

Hope that this helps! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.