Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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"

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

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


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.