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

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.

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 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:

Hope that this helps! Regards, Bobby