Question

Permission Denied (PublicKey)

Hey there. For starters, I am a total noob to server set up. What I need to do is set up SSH log in to my VPS. For reference, I am using Ubuntu 14.04 and I used PuttyGen to make my key.

I connected my public key with my DigitalOcean account, and so my new server was made with an SSH included. I have two questions: What are the details that I would need to send someone to allow them to log into my server with SSH?

And finally, whenever I try to log into my server with SSH from a console, by doing a command like: ssh MYIPADDRESS, it says PublicKey Denied. I am able to connect with my private key no problem, but I know that i should not share that and so I must find otherways to connect. Any help is appreciated, thank you.

So basically, I can connect with Putty using private key, but cannot connect any other way!

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.

Hey friend!

Great questions. So the reason for the failure in this case may be that your private key is not in the default location for the OpenSSH CLI client. You say your private key works elsewhere, I assume you’re feeding it manually to a different application. You could point OpenSSH to it as well like this:

ssh -i /path/to/privatekey root@serverIP

As for giving someone else access, just ask for their public key and put it in /root/.ssh/authorized_keys on the droplet. They would be able to log in with their own private key then.

Hope this helps :)

Jarland