Add Keypair to existing EC2 instance

前端 未结 10 894
夕颜
夕颜 2020-11-28 17:32

I was given AWS Console access to an account with 2 instances running that I cannot shut down (in production). I would however like to gain SSH access to these instances, is

10条回答
  •  臣服心动
    2020-11-28 17:44

    This happened to me earlier (didn't have access to an EC2 instance someone else created but had access to AWS web console) and I blogged the answer: http://readystate4.com/2013/04/09/aws-gaining-ssh-access-to-an-ec2-instance-you-lost-access-to/

    Basically, you can detached the EBS drive, attach it to an EC2 that you do have access to. Add your SSH pub key to ~ec2-user/.ssh/authorized_keys on this attached drive. Then put it back on the old EC2 instance. step-by-step in the link using Amazon AMI.

    No need to make snapshots or create a new cloned instance.

提交回复
热议问题