1

Hey I am really new to Ubuntu so hopefully someone can help me out set up a vps on aws. I have created a private key to use with ssh.

I am wondering what is the best way for me to allow someone else I am working with to access the server.

I of course can't give them my private key, so will public keys work for that? Or what is the best way to set up a user account for them so they can access it through ssh?

1
  • When you are working in AWS, you must change your mind about something, for example, we have the same problem as you said, but we create some new servers for our contractor or our development team.They never access to our production server, and it's information. When they work finished you can terminate resources. Jul 13, 2016 at 10:48

2 Answers 2

0

You can add their public key to your account on the remote server.

Log in to the remote server and edit the file ~/.ssh/authorized_keys

Add your friend's public key to the end of that file and have them log by typing:

ssh [email protected]

Keep in mind that when they log in this way, they are effectively you and can do whatever you can do on the box.

1
  • This will expose the system and any private files you may have to that user. A definitely BAD idea. Leaving the security issues besides, you will be liable for every action they take on the server.
    – hmayag
    Feb 5, 2014 at 22:49
0

Since you are already using SSH, I'll assume you have a working sshd setup on your system.

Just create a new user account on the server, grant the appropriate privileges you deem necessary to it (sudoers, etc), and give the login credentials to your colleague. If you want them to use SSH to remotely login, just have them create a key pair on the server the same way you did for your account.

A valuable source for information is the official documentation. Just select your version, then click on the "Ubuntu Server Guide" link. You will be presented with various guides. For information on SSH and sshd configuration, click on the "Remote Administration" link. Here's a quick link for 12.04LTS server edition.

Here's information on how to add a new user (browse to the end of the page for command line method).

1
  • yea i am using putty, thanks for the link. will have to look into just what privileges to turn on for this new user account.
    – user245062
    Feb 6, 2014 at 0:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .