A few days ago, I created a new key pair for a client's AWS EC2 instance. For some reason, I could no longer log in with the prior key pair I created. Immediately after creating a new SSH key pair, I named it and downloaded the .pem file to my iMac in
~/.ssh. The first SSH attempt worked perfectly -- I tunneled in without any issues or errors.
However, since then, I cannot SSH into this same instance, no matter what I do. I tried rebooting the instance and even created a new SSH key pair. To make sure AWS was seeing my .pem file, I ran
ssh-add ~/.ssh/new.pem and keep getting
Permission denied (publickey). I'm at a loss as to why this is happening. I can ssh into my own AWS EC2 instance without any trouble. I am also able to SSH into other client websites without any problems.
I have tried everything I can think of. Am I missing something?
Thanks in advance!