Skip to main content

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}.pem

Test logging in again, now without issue.

Related articles

Andrew Fletcher28 Aug 2024
Troubleshooting PHP 8.3 mbstring issues on Ubuntu with Nginx
Maintaining a Drupal site is usually smooth sailing once the environment is properly set up. However, even in a stable environment, updates to modules can sometimes reveal underlying configuration issues that weren't apparent before. This was the case when I updated a contrib module on a Drupal 10.3...