Trying to SSH into an Amazon Ec2 instance - permission error

后端 未结 29 3446
一生所求
一生所求 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:37

    Ok man, the only thing that worked for me was:

    1. Change permissions of the key

      chmod 400 mykey.pem

    2. Make sure to log in using ec2-user, and the correct ec2-99... address. The ec2-99 address is at the bottom of the aws console when you're logged in and seeing your instance listed

      ssh -i mykey.pem ec2-user@ec2-99-99-99-99.compute-1.amazonaws.com

提交回复
热议问题