SSH: WARNING: UNPROTECTED PRIVATE KEY FILE! Error and Solution

The “WARNING: UNPROTECTED PRIVATE KEY FILE!” error message occurs when the permissions on the private key file used for SSH authentication are too open, allowing unauthorized access to the key.

To resolve this issue, you need to change the permissions on the private key file to make it readable only by the owner. You can do this by using the following command:

$ chmod 600 <private_key_file>

Replace <private_key_file> with the path to your private key file. For example:

$ chmod 600 ~/.ssh/id_rsa

Once you have changed the permissions on the private key file, try the SSH connection again. The error message should no longer appear.

(https://www.littlegermanytucson.com/)

Leave a Comment