0

What I did:

  1. I had an old instance that I no longed needed so I terminated it.
  2. Created new RHEL-6.4 micro instance.
  3. Created new .pem file from "Key Pairs" section, downloaded and chmoded it to 400.
  4. Run the following command from my terminal "ssh -i FILE_NAME.pem ec2-user@ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com"

and I get the following error message:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Any ideas what am I doing wrong?

2

Key pairs need to be associated with the instance when you create it. Adding a key pair doesn't add it to existing instances.

Essentially, you need to reverse steps 2 and 3 and launch the new RHEL instance with the key pair you made.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.