Trying to SSH into an Amazon Ec2 instance - permission error

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

    You are likely using the wrong username to login:

    • most Ubuntu images have a user ubuntu
    • Amazon's AMI is ec2-user
    • most Debian images have either root or admin

    To login, you need to adjust your ssh command:

    ssh -l USERNAME_HERE -i .ssh/yourkey.pem public-ec2-host
    

    HTH

提交回复
热议问题