Question

How to share a DigitalOcean server with keys between two computers

Hi,

So a colleague and I have set up a Digital Ocean server, and tried setting up the Keys. There are only two of us, and after he set up his key, I received a “permission denied (publickey)” notice in my Mac Terminal. I can’t log into the server, or set up my own keys now. Neither as root, or as the username I created.

So how would we in fact make it so that we can both use SSH keys, and log onto the server directly, and use it with Perforce to work on the same project. Would I need to manually add his keys to my computer? How would I do that if I cannot login to the server because of the publickey error? We have perforce set up, but now since i’m getting this publickey error, I cannot setup my SSH keys or login to the server.

Thank you,

D


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.

Thanks,

I understand, but I can’t add any commands since permission is denied in the terminal because of his publickey.

Right now we only have one key, and I do not have the ability to make one on my computer since Permission is Denied because of the public key. How would we get the public key on his computer blocking my access to the server to let me to access the server to type in his key information, or generate my own key.

Thank you

The ~/.ssh/authorized_keys file can handle more than one line. Simply add the second public key under the first one on a new line.