-->

Thursday, June 7, 2012

Git And ssh on server

Adding a user to existing server to have git access sup

$ sudo groupadd developers
$ sudo useradd -G developers -d /home/john -m -s /bin/bash john
$ sudo useradd -G developers -d /home/andrew -m -s /bin/bash andrew

$ sudo passwd john
$ sudo passwd andrew

connect users toserver withut pssword , using public key that is in the .ssh/authorized_keys ander the home user folder
Verify that user is owner of /home/username and .ssh and authrization_keys

cd .ssh
chmod og-rw authorized_keys
chmod a-x authorized_keys
cd ~
chmod 700 .ssh
the user public key should have strict access so we need to :
chmod u+rwx /home/ec2-user/.ssh/ -R
chmod a-rwx /home/ec2-user/.ssh/ -R ??? not sure

No comments:

Post a Comment