Monday, July 13, 2015

Unprotected key file while ssh the remote host.

Hello Friends, you all may have faced the unusual error like this:

This error is basically self explanatory, and tells you that the public key(.pem) file what you are using to login to the remote server is actually not protected from the world, on the basis of the permissions(linux permissions).

If you do the ls -l, command in the directory where your pem file is situated you will find that the listing tells you that the file is not protected from the outside world. The file permission for the pem file should exactly be 400.

So just do change the file permissions of the pem file using the chmod command like this:

  • chmod 400 filename.pem
This will change the file permission and will let you use the file to do the login.


No comments:

Post a Comment