Trying to SSH into an Amazon Ec2 instance - permission error

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

    I know this is very late to the game ... but this always works for me:

    step 1

    ssh-add ~/.ssh/KEY_PAIR_NAME.pem
    

    step 2, simply ssh in :)

    ssh user_name@
    

    e.g.

    ssh ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
    

    hope this helps someone.

提交回复
热议问题