Andrew Fletcher published: 7 July 2022 1 minute read
Accessing a remote server using PEM key, and I had the following response
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/Users/andrewfletcher/Sites/PEM/{project}.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 "/Users/andrewfletcher/Sites/PEM/{project}.pem": bad permissions
{username}@{domain}: Permission denied (publickey).The issue with the permission is that it is set 0644. I need to alter to 0600, which can be achieved using chmod.
chmod 0600 {key_name}.pemTest logging in again, now without issue.