Load key key123 pem invalid format ec2-user 13 127 118 117 Permission denied publickey gssapi-keyex gssapi-with-mic

0 votes

Hi Guys,

I am trying to do SSH in my instance. But it is showsing me the below error.

C:\Users\NADIM AKTHAR>ssh -l ec2-user 13.127.118.117 -i key123.pem
The authenticity of host '13.127.118.117 (13.127.118.117)' can't be established.
ECDSA key fingerprint is SHA256:FnoSXFNxXBt73s6wR3sXr57b4591FotlHugLqWFMDaw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '13.127.118.117' (ECDSA) to the list of known hosts.
Load key "key123.pem": invalid format
ec2-user@13.127.118.117: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

How can I solve this?

Jun 2, 2020 in AWS by akhtar
• 38,260 points
5,511 views

1 answer to this question.

0 votes

Hi@akhtar,

Actually the key you have created is not in proper format. AWS is unable to read that key. So Create your key in proper format. You can use the below given command.

C:\Users\NADIM AKTHAR>aws ec2 create-key-pair --key-name MykeyPair  --query "KeyMaterial" --output text > MykeyPair.pem

Hope this will help.

answered Jun 2, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer

bad permissions: ignore key: .ssh/my_private_key.pem Permission denied (publickey).

Hi@akhtar, In your error message it shows you ...READ MORE

answered Apr 28, 2020 in AWS by MD
• 95,460 points
10,965 views
0 votes
1 answer
0 votes
1 answer

Permission denied when I SSH access to EC2 instance

These are common reasons that can cause ...READ MORE

answered Mar 12, 2019 in AWS by Reema
2,024 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP