Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid Permission denied (publickey) SSH key (Windows)

I want to connect my ec2 with SSH. But i get this error :

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'F:\\Config\\first1.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "F:\\Config\\first1.pem": bad permissions
[email protected]: Permission denied (publickey).

How can i solve this problem on Windows?

like image 228
Şevval Kahraman Avatar asked Jan 21 '26 05:01

Şevval Kahraman


1 Answers

This is the method worked for me

Step 1

Step 1

Right click the Key file first1.pem on explorer and Go to Properties > Security > Advanced > Disable Inheritance

Step 2

Step 2

Select "Convert inherited permissions into explicit permissions on this object"

Step 3

Step 3

Then delete everything there ( Including Administrator, User, User Groups ) and Click Add button.

Step 4

Step 4

Now select select a principal > Advanced > Find Now > [ Your User object ] > OK

Step 5

Step 5

Now you can tick "Full Control" then press OK

Now your key file is not accessible by others. This is the only method worked for me. Hope it helps. Thank You.

like image 146
Kate Sinclair Avatar answered Jan 23 '26 04:01

Kate Sinclair



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!