Yes, again Windows Entertainment. This process of setting permission of ec2 key is pretty simple on Linux but it is not that straightforward on Windows.
if we want to perform SSH to the ec2 instance from a Windows machine using the key, then it checks the permission of the key and if it is accessible to any other user apart from the system, administrator, and logged-in user it gives below error.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'private-key.ppk' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "private-key.ppk": bad permissions
key could be a *.ppk or *.pem
perform the below steps to set appropriate permission.
- right click on the key file
- select security tab
- click Advanced button
- click the Disable Inheritance button and then select the recommended option to remove the inherited access
- select the unwanted user from list of users and remove other users apart from above mentioned users.
- click on the Add button in the advanced security section
- select a principal
- Enter your Windows user name in “Enter the object name to select”
- click ok
- click ok
- click Apply
- click Apply
if you are still facing any issues or have any suggestion then comment and we can have interaction