TechAE Blogs - Explore now for new leading-edge technologies

TechAE Blogs - a global platform designed to promote the latest technologies like artificial intelligence, big data analytics, and blockchain.

Full width home advertisement

Post Page Advertisement [Top]

[Solved] WARNING: UNPROTECTED PRIVATE KEY FILE!

[Solved] WARNING: UNPROTECTED PRIVATE KEY FILE!

Overview:

While working on the AWS EC2 instance, this error was introduced in Windows:

Error:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

It is required that your private key files are NOT accessible by others.

This private key will be ignored.

ubuntu@ec2-3-236-198-125.compute-1.amazonaws.com: Permission denied (publickey).

Reason:

You face this fatal error (WARNING: UNPROTECTED PRIVATE KEY FILE!) because the access permissions are not given to the user.

Solution:

Go to the terminal and write the following code:

$ icacls.exe your_key_name.pem /reset
$ icacls.exe your_key_name.pem /grant:r "$($env:username):(r)"
$ icacls.exe your_key_name.pem /inheritance:r

Your keys.pem will now have the same restrictions as "chmod 400" in Linux.

See you next time.

@TechAE

Buy Me A Coffee

No comments:

Post a Comment

Thank you for submitting your comment! We appreciate your feedback and will review it as soon as possible. Please note that all comments are moderated and may take some time to appear on the site. We ask that you please keep your comments respectful and refrain from using offensive language or making personal attacks. Thank you for contributing to the conversation!

Bottom Ad [Post Page]