Tuesday, May 25, 2021

Linux User Creation With SSHKeypairs on AWS

 In order create user account linux server with ssh keypair for login server with putty tool.

Follow the below steps:

Step 1: Login to Linux server where you want to create user account.

Step 2: create user accouunt by using below command

    useradd -m -s /bin/bash <user name>

Step 3: To check whether user account created

cat /etc/passwd

Step 4: Switch into created user

su - <user name>

Step 5: create .ssh directory under user's home folder

/home/<user name>/  mkdir .ssh

Step 6: change the .ssh directory permission and navigate to that directory

  chmod 700 .ssh

cd .ssh

step 7: under the user's home folder in .ssh directory.  need to generate keypair 


step 8: It will generate two files

id_rsa    ----> this private key of user

id_rsa.pub ----> this is the public key user

step 9: create a file called authorized_keys and copy the content of from id_rsa to authorized_keys file

       cp id_rsa.pub authorized_keys

step 10: change the permission of authorized_keys

chmod 600 authorized_keys

step 11: copy the id_rsa file content to vdc server and open and notepate paste the content and save the file with pem extentio "filename.pem"

step 12: open puttygen tool and load the pem file and save as the private key.  it will prompting to save your file.  now your pem file is converted into ppk file

step 13: try to login with this ppk file for specified linux server


  1. It's a really helpful blog. I really appreciate your information which you shared with us. If anyone wants to create his/her career in MIS. Get a free demo , call on 9311002620 or visit website-https://www.htsindia.com/Courses/business-analytics/mis-training-instiute-in-delhi

  2. The 96 well plate with square holes and flat transparent bottom is used for all large-scale laboratory applications, and is very suitable for cell and tissue culture, sample storage, etc.