2014年4月8日 星期二

[AWS]connect ec2 Permissions 0644 for 'instance1.pem.cer' are too open.

pc@IronMan[~/Documents/sshf]{10:59}
$ ssh -l ec2-user -i instance1.pem.cer ec2-AAAA.BBB.CC.DD.ap-southeast-2.compute.amazonaws.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'instance1.pem.cer' 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: instance1.pem.cer


pem files should be viewable
you can chmod your pem file
example
chmod 400 instance1.pem

The problem is having wrong mod on the file.
Easily solved by executing -
chmod 400 mykey.pem
Taken from Amazon's instructions -
Your key file must not be publicly viewable for SSH to work. Use this command if needed: chmod 400 mykey.pem
Trying to SSH into an Amazon Ec2 instance - permission error - Stack Overflow http://stackoverflow.com/questions/8193768/trying-to-ssh-into-an-amazon-ec2-instance-permission-error

沒有留言:

張貼留言