How to share a DigitalOcean server with keys between two computers

February 12, 2016 388 views
Configuration Management DigitalOcean Getting Started


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,


2 Answers

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.


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

Have another answer? Share your knowledge.