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

  Рет қаралды 37,908

Enkripsan

Enkripsan

Күн бұрын

This video is going to be about how to connect or access an EC2 instance in case you lost your private key or the .pem file or you accidentally deleted the file permanently.
What will we do in this video?
We will Create a new EC2 Linux instance named ‘dev-stage-new’ with a keypair
Then, we will Access the EC2 instance using the keypair
Next, we will Delete the keypair (after that, we won’t have the keypair to access the ec2 instance)
Again, we will Create a new ec2 instance named ‘dev-stage-old’ with a new keypair, and then
Perform our lab task to access the old EC2 instance whose keypair is already lost or deleted.
So, let’s begin.

Пікірлер: 45
@techfuture-code-tv
@techfuture-code-tv 4 ай бұрын
This is awesome, God Almighty will continue to enrish your knowledge in the industry.
@noname-ns3nh
@noname-ns3nh 2 жыл бұрын
Thank you. your tutorial just saved me from a huge trouble :)
@Enkripsan
@Enkripsan 2 жыл бұрын
Glad I could help !
@gktirkha
@gktirkha 11 ай бұрын
you just saved me from a big trouble thank you
@Enkripsan
@Enkripsan 7 ай бұрын
Most welcome
@vineet_kumar555
@vineet_kumar555 Жыл бұрын
50% video is good and understood
@Enkripsan
@Enkripsan Жыл бұрын
Can you please give me your feedback regarding the rest 50%. Thank you.
@vineet_kumar555
@vineet_kumar555 Жыл бұрын
​@@Enkripsan mount is very lengthy process
@kennethmenniboe
@kennethmenniboe 2 жыл бұрын
Thank you Enkripsan, it is straightforward and detailed.
@Enkripsan
@Enkripsan 2 жыл бұрын
Most welcome !
@A.Sandeep-18
@A.Sandeep-18 2 ай бұрын
At 10:00, youve copied and cat keypair to the old volume but the question is what you have copied? if it the temporary instance's keypair youve copied to the old one ?
@shravankumar1270
@shravankumar1270 2 жыл бұрын
Thank you so much sir Thank you for worderful explaination
@Enkripsan
@Enkripsan 2 жыл бұрын
Most welcome !
@rudrakshya1
@rudrakshya1 Жыл бұрын
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.
@Enkripsan
@Enkripsan Жыл бұрын
Most welcome
@Jaden5165
@Jaden5165 2 жыл бұрын
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 :)
@Enkripsan
@Enkripsan 2 жыл бұрын
you can create the mount point directory in a different name and mount the drive to the directory...hope it works !
@jwk05003
@jwk05003 Жыл бұрын
same exact problem for me. This command was my workaround "mount /dev/xvdf1 /mnt"
@roshangamer6811
@roshangamer6811 2 жыл бұрын
Loved it. Absolutely Thanks
@Enkripsan
@Enkripsan 2 жыл бұрын
So glad!
@isi24.8
@isi24.8 8 ай бұрын
Thank you very much :: You saved me
@Enkripsan
@Enkripsan 8 ай бұрын
Glad I could help
@madhanops
@madhanops Жыл бұрын
To attach and detach volume We don't have to stop the instanc, Right?
@bandwidthbucks
@bandwidthbucks 3 ай бұрын
I think you have not watched it carefully
@madhanops
@madhanops 3 ай бұрын
I'm not getting bro.. pls explain ​@@bandwidthbucks
@bandwidthbucks
@bandwidthbucks 3 ай бұрын
@@madhanops Bro watch this video 9 months ago right, you would have watch this lot many times, still you don't understand. Okay let it be its a best practise to stop and then detach the volume for safer side.
@hassanmir5309
@hassanmir5309 Жыл бұрын
You just nailed it, please tell me why did you rename it to xvda1 at last.
@kondisettynarender3290
@kondisettynarender3290 Жыл бұрын
because it is root volume.
@madhavan.g4187
@madhavan.g4187 Жыл бұрын
Great job bro. Carry on.
@Enkripsan
@Enkripsan Жыл бұрын
Thanks
@djangodeveloper2973
@djangodeveloper2973 Жыл бұрын
the video is very helpful. thanks.
@saurabhfule4295
@saurabhfule4295 Жыл бұрын
you should explain the " mount -o rw, nouuid " this command what it will do in detail rather that video is superb
@Enkripsan
@Enkripsan Жыл бұрын
Thanks for the idea!
@jwk05003
@jwk05003 Жыл бұрын
Thank you!
@andukurinaveenkumar3760
@andukurinaveenkumar3760 Жыл бұрын
awesome dude
@rizwanhawaldar2567
@rizwanhawaldar2567 Жыл бұрын
Why can't we just create a ami of that server with new key and make that instance live💀 just asking
@Enkripsan
@Enkripsan 11 ай бұрын
Yeah, you can do that as an other way.
@progjr1062
@progjr1062 11 ай бұрын
what if the instance is running on windows?
@Enkripsan
@Enkripsan 10 ай бұрын
Need to check.
@legend3001
@legend3001 2 жыл бұрын
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.
@Enkripsan
@Enkripsan 2 жыл бұрын
Availability zone must be the same. If you are trying to attach to the different availability zone, it may not show you.
@rritsoftwaresolutions9566
@rritsoftwaresolutions9566 2 жыл бұрын
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
@durgaprasadandraju7409
@durgaprasadandraju7409 3 ай бұрын
I followed each and every step in linux not worked. Time waste.
@sureshk9160
@sureshk9160 2 жыл бұрын
Hello Team , Y'day One interview attended Question : I lost my key pair not sure where i saved but i want connect throw putty itself not in console #Connect ec2 You can take backup of image or snapshot to recover the instance back but #here #i #want #same #public #ip address how to recover my ip ? Plz team any one can provide link how to recover is that possiable ? 🔐🔑🔐🔑🔐🔑 ☝️☝️☝️
@rritsoftwaresolutions9566
@rritsoftwaresolutions9566 2 жыл бұрын
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
How to connect to a Linux  EC2 instance if you lose your private key
20:26
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН
Ouch.. 🤕⚽️
00:25
Celine Dept
Рет қаралды 14 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 60 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 262 #shorts
00:20
How do I recover windows EC2 instance if PEM file is lost
19:34
Easiest way to recover lost PEM key of AWS EC2 Instance | WITHOUT RESTART
11:05
SSH Tunneling Explained
6:37
Tinkernut
Рет қаралды 486 М.
How I Would Learn AWS Today (after 10 years of cloud experience)
40:28
Be A Better Dev
Рет қаралды 423 М.
build your own cloud
47:13
NetworkChuck
Рет қаралды 2 МЛН
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 312 М.
How to Recover AWS Ec2 Instance Key | Cloud Architect
10:42
Cloud Architect Rahul
Рет қаралды 8 М.
How to SSH into Amazon EC2 Machine | SSH AWS EC2
10:27
Piyush Garg
Рет қаралды 21 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 8 МЛН