Everything worked great till yesterday. Today I am unable to
ssh to my
The settings are saved in
The error I get, when using
.us-east-2.compute.amazonaws.com: Permission denied (publickey).
I went ahead and double checked the permission on the
I have another
ec2 running with the same
.pem so I connected to it. No problem, login done.
I then tried to
ssh into the problematic
ubuntu user and same
.pem file. It worked I was able to login.
I then switched users and the
test user exists.
I am not sure about what the issue might be.
ssh session and tried connection again using the
test user and got the same error.
I found an answer here:
But the answer is not very helpful.
It might be permission issue on the .ssh directory of the test user on the remote box
- Connect the same way with ubuntu user.
- Compare the permissions on ssh directory of test user and all its content (authorized keys, known host, config) with the one of ubuntu user.
- Check content of authorized_keys file in test ssh directory and make sure it matches the public key of the private key you are connecting with.
- You can use ssh -vvv while connecting, to check if it is using the right key while connecting.
- Final resort: tail the ssh logs while you are trying to connect with test user.