I'm trying to access new user which is created in AWS instance using SSH, but it throws an error when i execute the command ssh -i new_keypair.pem new_user@54.XXX.XXX.XXX
Error : Permission denied (publickey,gssapi-keyex,gssapi-with-mic)..
I followed each and every steps as mentioned in AWS document https://aws.amazon.com/premiumsupport/knowledge-center/new-user-accounts-linux-instance/
Please Let me know is there any additional configurations are required to access newly added user using SSH..
Best Answer
Add the newly created user in /etc/ssh/sshd_config as mentioned below. It's also working fine.
AllowUsers root new_user
AllowGroups root new_user