Trying to SSH into an Amazon Ec2 instance - permission error

后端 未结 29 3489
一生所求
一生所求 2020-11-27 08:51

This is probably a stupidly simple question to some :)

I\'ve created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to

29条回答
  •  青春惊慌失措
    2020-11-27 09:34

    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

    400 protects it by making it read only and only for the owner.

提交回复
热议问题