I have been using key pairs to log in to my EC2 instance without any problems until I made some changes to the ec2-user.
I changed the group of the ec2-user (usermod) and changed the default file permission (umask), to give write permissions to the group.
I am not able to log in since this change. I get a "Server refused our key" error for the ec2-user.
The key has not been modified in any way. Since changing the default file permissions was the last change I guess it may be related to that, but I am not sure why that could be an issue.
Has anyone faced similar issues? Are we not expected to change properties/permissions of the default ec2-user? How does one recover from this situation?