bad permissions ignore key ssh my private key pem Permission denied publickey

0 votes

Hi Guys,

I am trying to connect my instance using SSH, but it shows me the below error.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '.ssh/my_private_key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: .ssh/my_private_key.pem
Permission denied (publickey).

How can I solve this error?

Apr 28, 2020 in AWS by akhtar
• 38,260 points
11,054 views

1 answer to this question.

0 votes

Hi@akhtar,

In your error message it shows you are using .ssh/my_private_key.pem with file permissions of 0777, which allow anyone to read or write to this file. This permission level is very insecure, and so SSH ignores this key. To fix the error, execute the following command, substituting the path for your private key file.

$ chmod 0400 .ssh/my_private_key.pem

Hope this will solve your error?

answered Apr 28, 2020 by MD
• 95,460 points

Related Questions In AWS

+1 vote
1 answer

AWS ssh access permission denied (public key issue)

For Ubuntu Instance, First, check whether you have ...READ MORE

answered May 13, 2019 in AWS by sunshine
• 1,300 points
7,183 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,061 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