html
Copy code
Reading Time: < 1 minute
Today, we are going to learn how to fix the error:
Permissions 0644 for ‘*.key’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “*.key”: bad permissions
Permission denied (publickey).

This problem is due to the permissions on the key files. To fix it, we need to provide the correct permissions.
To do this, execute the following command:
sudo chmod 600 path_to_your_key.key
Remember that the .ssh directory should have permission 700:
sudo chmod 700 .ssh
