I have a .pem key file that i use to ssh
to my ec2 server. I've moved this key file to an encrypted external SSD disk. This has caused the owner of the pem key to be set to 'everyone'.
When i try to use this key in cmd.exe
i get the warning
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'XXXXXXX-kp.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 "XXXXXX-kp.pem": bad permissions
XXXXXX.compute-1.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
I also use this key to connect to my amazon RDS instance via an EC2 SSH connection. This somehow works without any problem. I've also copied this pem file to the shared folder on my smartphone as a backup. I also have termux
installed on the smartphone and with termux
i can also ssh to my ec2 instance using the pem file without any problems.
So how bad is it exactly when you don't assign an owner to your pem file? Does it somehow make the ssh connection less secure? If so, how?