Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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