How to connect an EC2 instance if you lost your keypair (.pem) file ? Recover AWS keypair

How to connect an EC2 instance if you lost your keypair (.pem) file ? Recover AWS keypair

Enkripsan

2 года назад

36,569 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Madhavan .G
Madhavan .G - 17.10.2023 19:22

Great job bro. Carry on.

Ответить
RIZWAN HAWALDAR
RIZWAN HAWALDAR - 10.10.2023 21:50

Why can't we just create a ami of that server with new key and make that instance live💀 just asking

Ответить
Madhan S
Madhan S - 04.10.2023 18:25

To attach and detach volume We don't have to stop the instanc, Right?

Ответить
Rudrakshya Barman
Rudrakshya Barman - 24.08.2023 11:22

Hello, may be you don't know how much your video help me today. It was horrible experience when I accidentally delete the public key from ~/.ssh/authorized_keys and forgot to add the new one. It was locking out myself from the server. I was in huge trouble. Thank you very much from the bottom of my heart.

Ответить
Andukuri Naveenkumar
Andukuri Naveenkumar - 05.03.2023 15:16

awesome dude

Ответить
DJANGO DEVELOPER
DJANGO DEVELOPER - 18.02.2023 13:39

the video is very helpful. thanks.

Ответить
Hassan Mir
Hassan Mir - 10.02.2023 18:37

You just nailed it, please tell me why did you rename it to xvda1 at last.

Ответить
Saurabh Fule
Saurabh Fule - 24.01.2023 09:41

you should explain the " mount -o rw, nouuid " this command what it will do in detail rather that video is superb

Ответить
Joseph Kearns
Joseph Kearns - 09.12.2022 21:54

Thank you!

Ответить
Amol Rekhawar
Amol Rekhawar - 02.12.2022 20:20

50% video is good and understood

Ответить
rr it software solutions
rr it software solutions - 27.07.2022 15:23

THIS IS ONE METHOD - OK , PLEASE DO ANY ANOTHER METHOD FINDOUT PLEASE SHARE THE NEXT VIDEO AND ATTACHED TO NOTE BOOK POINTS- LIKE-


Concept Overview
Detail Demo
Steps on system:-
Check File system

lsblk -f


Create tempvolume for mounting
sudo mkdir /mnt/tempvol


Mount tempvolume [below one is for xfs filesystem]
sudo mount -t xfs -o nouuid /dev/xvdf1 /mnt/tempvol



Check Mounting
lsblk -f



copy authorized_keys to mounted volume
cp .ssh/authorized_keys /mnt/tempvol/home/ec2-user/.ssh/


Check the content on new volume
ls -lah /mnt/tempvol/home/ec2-user/.ssh/


umount the secondary volume
sudo umount /mnt/tempvol
============================

FIND/NOTE THE OLD EC2 EBC-VOLUME ID ,, AND EC2 - MACHINE -ID AND ROOT VOLUME ATTACHED TIME BECAREFULL USED THIS /dev/xvda

i-0daf83c2c139b56b2


vol-0d1f1be8faa630a29 /dev/xvda 8
Attached

Ответить
Kenneth Menniboe
Kenneth Menniboe - 21.06.2022 19:51

Thank you Enkripsan, it is straightforward and detailed.

Ответить
J
J - 07.06.2022 06:08

Hi, the fstype i got is a ext4. when i use the command "mount -o rw,nouuid /dev/xvdf1 /mnt " got error with "mount: /mnt: wrong fs type, bad option, bad superblock on /dev/xvdf1, missing codepage or helper program, or other error. ". May I know how to solve this? Thank you :)

Ответить
shravan kumar
shravan kumar - 14.03.2022 11:57

Thank you so much sir
Thank you for worderful explaination

Ответить
Legend
Legend - 07.03.2022 06:50

hii sir at last step when i am going to attach volume it is not showing new instance how to rectify it .
please explain me .
it is showing same availability zones only displayed here.
how to fix this sir.

Ответить
roshan Gamer
roshan Gamer - 11.02.2022 13:41

Loved it. Absolutely Thanks

Ответить
no name
no name - 08.02.2022 19:37

Thank you.
your tutorial just saved me from a huge trouble :)

Ответить