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}.pem
Test logging in again, now without issue.
Related articles
Andrew Fletcher
•
03 Sep 2024
Best practices and methods on how to create a Drupal 10 patch
When working on Drupal projects, especially in a collaborative environment, it’s crucial to follow best practices for creating and managing patches. Patches are essential for contributing back to the community, applying quick fixes, or sharing custom changes with your team. In this article, we'll...
Andrew Fletcher
•
31 Aug 2024
Resolving the "PHP warning: module 'mbstring' is already loaded" issue when running drush cr
If you're working with Drupal on an Ubuntu 24.04 server, it's common to use the command line interface for various tasks, including clearing the cache with drush cr. However, you might encounter a warning like thisPHP Warning: Module "mbstring" is already loaded in Unknown on line 0This warning...
Andrew Fletcher
•
28 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...