Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

[ RESOLVED ] AWS SSH Error : Permissions are too open




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

Reference

1 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
2. https://www.ssh.com/ssh/command/
3. https://www.linux.com/learn/understanding-linux-file-permissions

Image Credit : https://pixabay.com/en/puzzle-match-fit-missing-hole-693873/


This post first appeared on Devdummy, please read the originial post: here

Share the post

[ RESOLVED ] AWS SSH Error : Permissions are too open

×

Subscribe to Devdummy

Get updates delivered right to your inbox!

Thank you for your subscription

×