By default the AWS EC2 instance come with the ec2-user access enabled via access keys. If we choose to keep the key access only and try to create other users that require access to the host we need to make some changes. Error Message :
mkdir /home/<user/.ssh
cp /home/ec2-user/.ssh/authorized_keys home/<user/.ssh/
chmod 700 /home/<user/.ssh
chmod 600 /home/<user/.ssh/authorized_keys
chown -R <user:<usergrp /home/<user/
2 - Load the *.pem key file you downloaded from AWS.
3 - Save the key
4 - Open a new putty session and type the ipaddress of the ec2 instance:
Go to SSH - Auth, and paste the full patf to the new generated key.
Now you should be good to go and connect to the ec2 instance using the key and any other user you choose.