EC2 lost key pairs

0

I did something six months ago on an EC2 instance. I've tried all the steps about 30 times and gave up. I have tried by edit user data and also using AWSSupport-ResetAccess. I have just tried again and noticed the error output on AWS Systems Manager. Can anyone help please? What can I do? Here is the output... Locating rescue device Mounting rescue volume /dev/nvme1n1p1 unlink /mnt/mount/etc/resolv.conf '/etc/resolv.conf' -> '/mnt/mount/etc/resolv.conf' removed '/mnt/mount/usr/bin/ec2rl' '/mnt/mount/usr/bin/ec2rl' -> '/usr/local/ec2rl-1.1.6/ec2rl' Generating new key pair Starting chroot Error: execution failure inside chroot environment.

The EC2Rescue execution did not complete successfully. removed 'etc/resolv.conf' umount: /mnt/mount/sys (sysfs) unmounted umount: /mnt/mount/dev/pts (devpts) unmounted umount: /mnt/mount/dev/pts (devpts) unmounted umount: /mnt/mount/dev/shm (tmpfs) unmounted umount: /mnt/mount/dev (devtmpfs) unmounted umount: /mnt/mount/proc (/proc) unmounted umount: /mnt/mount (/dev/nvme1n1p1) unmounted

----------ERROR------- chroot: failed to run command '/bin/bash': No such file or directory

질문됨 2년 전332회 조회
1개 답변
0

Hello,

Just checking, have you referenced this article? There are 4 methods outlined there. I see you have tried 2 of them already. Can you consider exploring the other 2?

[+] How can I connect to my Amazon EC2 instance if I lost my SSH key pair after its initial launch? - https://aws.amazon.com/premiumsupport/knowledge-center/user-data-replace-key-pair-ec2/

It does have a video recording you can reference - https://youtu.be/5V2hKFj9_SI

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠