Permissions for .pem are too open
Connecting to newly created Azure VM via SSH came across the error surrounding permissions on my pem file
PS c:\>ssh –i {pathtopemfile}.pem mailto:azureuser@{ipaddress}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for '{filename}.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
You locate the file in Windows Explorer, right-click on it then select "Properties". Navigate to the "Security" tab and click "Advanced".
a) Change the owner to you
b) Disable inheritance and delete all permissions.
c) Then grant yourself "Full control"
and save the permissions.
Now SSH won't complain about file permission too open anymore. It should look like the following