Authorization ssh on Amazon EC2 (publickey)


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
A bit confused with authorization on Amazon EC2.
There is a instance with Debian, authorization key for root works fine.
It is necessary to do authorization for other users.
Create Amazon Management Console a new Key Pair, get the file name.pem

And then what? how to bind this key to a particular user of Debian?
by | 5 views

1 Answer

0 like 0 dislike
This pair of keys is needed in order to when installing the system you can perform rutowski entrance and continue to manage the server. Use the guide that I wrote on the example of how to create a key user (wrote for red-hat, Debian it seems to be the same)
\r
1)Go to the server as root and add the user and generated the keys and in the name of the key enter user1 (below)
\r
adduser user1
cd /root/
ssh-keygen-t dsa
\r
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): user1
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): <press ENTER to have no password>
Enter same passphrase again: <press ENTER to have no password>
Your identification has been saved in /root/.ssh/user1.
Your public key has been saved in /root/.ssh/user1.pub.
\r

2)Copy the public key of user1 to the authorized_keys (if keys instead of the copy you need to add)
\r
mkdir /home/user1/.ssh
cp user1.pub /home/user1/.ssh/authorized_keys
chown user1:user1 /home/user1/.ssh/authorized_keys
\r

3) Rename the private key user1 to user1.pem to make it clear that it
\r
mv user1 user1.pem
\r

4)is Sent to a user of soap or even as key user1.pem
\r
5)Now user needs to enter a team from your company
\r
ssh-i user1.pem user1@hear.is.your.ip without a password
\r
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,858 users