Sign up ×
Server Fault is a question and answer site for 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"

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


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.