When you trying to ssh to a AMI (Mostly to an AMI, Amazon instance) using the following command,
$ ssh -i key.pem user@host
It may be showing the above the error
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING:
UNPROTECTED PRIVATE KEY
FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0677 for ' key.pem
' are too open.
It is required that your
private key files are NOT accessible by others.
This private key will be
ignored.
bad permissions: ignore
key: key.pem
Permission
denied (publickey).
Cause of the Error
This error is appearing due to the insecure permission level
of the certificate file of 0677.
Resolution
The rule is that the
Keys need to be only readable. So 400 is the acceptable level.
$ chmod 400 key.pem
Which will result the following,
-rwxrwx--- 1 root vboxsf 1692 Oct 12 17:46 key.pem
No comments:
Post a Comment