How to permit multiple users access to the same server/droplet?

Posted February 12, 2016 7.7k views
Getting StartedDigitalOcean

I am a new user and am not well versed in any of this stuff. I am creating a game in UE4 with multiple people housed on one server. I watched your tutorials on how to set up a new user/ssh keys etc. However after I did, none of my other teammates can access the server in the terminal. Was I not supposed to set up a ssh key? How can all of my teammates access the same droplet so that we can work on the same game and share information?

  • How many ssh keys did you make and where did you place the public portion of the ssh key(s)?

  • I only made 1 key. I watched this DigitalOcean video to set everything up. Everything he did, I did. I’ll rewatch the video to find where he place everything:

    How To Set Up Sudo and SSH Keys on Ubuntu 14.04

  • @rickydavid - OK. Here’s the checklist to check:

    1. The user’s machine has the private portion of the ssh key
    2. The user’s machine has a terminal program that is configured to find the private key
    3. The server has an account for the user
    4. The user account on the server has a directory like ~username/.ssh with read/write/exec permissions for the user only (all other permissions are off)
    5. There is a file ~username/.ssh/authorized_keys with read/write for the user only
    6. One of the lines in the authorized_keys file is the public portion of the ssh key that is associated with the private portion held on the user’s machine
    7. The user’s terminal program on the user’s machine is configured to login using the server account name
  • I only created one public/private ssh key and left the default location (/Users/Blah/.ssh/id_rsa):


2 answers

As long as you’ve assigned your droplet an IP address (on the console) they can get access with a userid and password, provided you’ve created them an account with useradd.
– Dick S.

Shared access (everyone uses one user account) can be done by having each additional developer (friend) create their own key (follow the tutorial like you did), then you add their public keys to the ~/.ssh/authorized_keys file (one key per line). They they’ll log in with the same username@server that you do (no password required).

They can email you their, since the public key file does NOT need protected. It’s just text, and you need to copy/paste the text into the authorizedkeys (I prefer a single line of text per key).

Let them know when you’ve saved the authorized_keys file, they can log in right away to verify it works.

Submit an Answer