Тёмный

Recover Lost Key Pair of AWS EC2 Linux Instance 

Vismi Tech
Подписаться 388
Просмотров 67 тыс.
50% 1

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 65   
@villagestroller6793
@villagestroller6793 7 лет назад
The easiest way is: 1) Create image of original image. 2) Launch new EC2 instance using AMI image (from step 1) with new key pair. 3) Login new EC2 instance with new key. Cheers!
@OkyCapriatto
@OkyCapriatto 6 лет назад
Easiest and faster! Thank you so much ♥
@youvish00
@youvish00 5 лет назад
Do we need to detach orginal instance and attach to new image instance before connecting?
@BallinVille
@BallinVille 4 года назад
@@youvish00 same question, i do new imagen and stop the old instance buut nithing happen.
@niravchheda8554
@niravchheda8554 4 года назад
Its May 2020, and this solution is still working as expected. Thanks Vismi Tech!
@afavaro2007
@afavaro2007 6 лет назад
Thank you very much! With your demo I was able to reset the key pair on a Bitnami wordpress instance.
@FullStackDevGreg
@FullStackDevGreg 2 года назад
men it still works in 2022, great job
@satishP2008
@satishP2008 5 лет назад
Best and easiest way so far... you nailed it dear
@viralpatel1522
@viralpatel1522 7 лет назад
Absolutely what I was looking for. Very Well Explained. Cheers Bro. Thumbs Up!
@alibekberdyyev4942
@alibekberdyyev4942 6 лет назад
Clear nice explanation step by step! Great job!
@BoolFalse
@BoolFalse 5 лет назад
Thanks man for the video. Even if it's old, but it helped me to use with another (in may case: existing) .pem file as key pair. Just few notes for watchers: 1. on 8:40 sure don't need to use the default "/dev/sdf". But "/dev/xvda" also didn't helped me, because after attaching that volume to the original (prod) instance, I've got an error when I want to start the instance. So instead I've used "/dev/sda1". I've found about that here: stackoverflow.com/a/45157742 But if you getting an error, don't be disappointed, check another versions of answers. The reason may be the difference of available zones. 2. Also after successfully starting the instance, and checking the SSH connection, you can easily terminate/delete the temporary (recovery) instance. So it not need anymore 3. Later for original instance, when you hit the "Connect" button, it will open a modal, which where mentioned about old key pair. Don't worry, that's normal. So remember to use the newly recovered .pem file for SSH connections.
@DanielV11
@DanielV11 7 лет назад
Amazing worked perfectly, thanks and keep up the good work man!
@LukeGrad
@LukeGrad 6 лет назад
You saved my day. Thank you!
@GabuSingha
@GabuSingha 5 лет назад
You saved my day!! I recovered access again!
@unaibamir
@unaibamir 5 лет назад
You just saved my day! :) Thank you.
@121chanti5
@121chanti5 4 года назад
Really worked out...Thank you
@arnavbagmar6215
@arnavbagmar6215 5 лет назад
"Problem Instance->Stop->Detach root vol . Create new instance->attach root vol->lsblk->mount->copy authrized key->stop ->detach/attach to old"
@techsteering
@techsteering 5 лет назад
Thanks a ton. You saved me.
@banveleart9087
@banveleart9087 5 лет назад
mount: /mnt/new: wrong fs type, bad option, bad superblock on /dev/xvdf1, missing codepage or helper program, or other error. i am not able to mount the volume
@nihalka9894
@nihalka9894 4 года назад
mount -o nouuid /dev/xvdf1 /mnt/recovery Use this command instead
@theJeraldo7
@theJeraldo7 6 лет назад
Nice video. Thanks. If my instance is not using elastic IP, will it generate a new public IP and will I need to update my DNS?
@skdogra2010
@skdogra2010 6 лет назад
Excellent ...thanks for sharing
@idlewild
@idlewild 4 года назад
Since you're concatenating the two key pairs to the authorized key file, are either key pairs able to access the production EC2 instance?
@折腾凯文杨
@折腾凯文杨 2 года назад
I think the title should be how to log onto an EC2 instance for which you lost the key with a new key instead of recover lost key
@tapasbarik3300
@tapasbarik3300 6 лет назад
That Worked! Thank You
@tushar5518
@tushar5518 6 лет назад
Very informative
@stephenpaulraj7028
@stephenpaulraj7028 7 лет назад
Thanks, helped a lot
@karthikeyankasthuri3075
@karthikeyankasthuri3075 6 лет назад
thanks. it works for me.
@karthikreddy4056
@karthikreddy4056 7 лет назад
works perfect...awesome...
@Raquelaz90
@Raquelaz90 5 лет назад
you da best!
@krishnakanth-io2tm
@krishnakanth-io2tm 8 лет назад
Thank you man!
@deltaruined
@deltaruined 5 лет назад
Thanks a lot man.
@ridhomaulana2627
@ridhomaulana2627 5 лет назад
THANK YOU SO MUCH
@xiaofeizhang3911
@xiaofeizhang3911 5 лет назад
Thanks a lot.
@ramanab1139
@ramanab1139 3 года назад
an error:Adter attached root volume to original server then starting instance ,i am facing " Instance reachability check failed". Please help me, i did restart the instance
@joram80
@joram80 5 лет назад
The original instance's device is "/dev/sdf1". How to handle it? Invalid value 'i-03d021052a9c26745' for instanceId. Instance does not have a volume attached at root (/dev/sda1) And then, when I set the device in /dev/sda1 , I cannot connect to the instance Show "ssh: connect to host xx.xx.xxx.xx port 22: Operation timed out"
@melanycordova9601
@melanycordova9601 6 лет назад
Hi there everyone I have a little problem, I have lost a key pairs of one of my instances, so when recovering the instance I have to stop the instance I have lost the key for, so will I loose data from that instance???
@sandeeperukulla3649
@sandeeperukulla3649 5 лет назад
yes me too. reply me steps if you get something
@भजनऔरलोकसंगीत
Data will not be lost if you stop instance.
@rajurec2721
@rajurec2721 5 лет назад
You can create new instance using volume which is created for old instance
@vasishtakavuturu689
@vasishtakavuturu689 3 года назад
cat command if we trying to copy from ubuntu to amazon linux??
@SeitMusainov
@SeitMusainov 5 лет назад
Чувак ты помог
@ajitStephen
@ajitStephen 6 лет назад
Thank you :)
@nithinkumar4915
@nithinkumar4915 7 лет назад
while iam attaching the /dev/xvda to old instance it showing error "Invalid value 'i-0f04c8f3ae12275e5' for instanceId. Instance does not have a volume attached at root (/dev/sda1)".please help me
@amareshjana3472
@amareshjana3472 6 лет назад
if i detach the volume will i loose the data?? Thnaks....
@srujankumarb
@srujankumarb 6 лет назад
Nope u will not loose any data
@abdulwaheed7821
@abdulwaheed7821 3 года назад
cat /home/ec2-user/.ssh/authorized_keys > /mnt/recovery/home/ec2-user/.ssh/authorized_keys it says no such file or directory
@BallinVille
@BallinVille 4 года назад
an error: when re-attach i need stop the second instance too
@भजनऔरलोकसंगीत
is there different directory for key in ubuntu? Since i followed same step but i am still not able to access with new key, i think i didn't key was not copied correctly. Please help anyone for ubuntu linux. Thanks in advance!
@ansonchu8991
@ansonchu8991 5 лет назад
try `cat /home/ec2-user/.ssh/authorized_keys > /mnt/recovery/home/ubuntu/.ssh/authorized_keys`
@villagestroller6793
@villagestroller6793 7 лет назад
It is not recovering the Lost Key. You are using your new key. You never able get back the old key. What if we use the same key for 100 instances?
@lordlogan3308
@lordlogan3308 6 лет назад
if u use the same key for 100 instances means u are stupid :D
@RollsRoyceFanatics
@RollsRoyceFanatics 7 лет назад
So simple
@chennakesava1291
@chennakesava1291 8 лет назад
how i can connect my instance on android?
@SuyaShark
@SuyaShark 4 года назад
server refused our key
@beyhan9191
@beyhan9191 6 лет назад
it's not case of lost key pair!
@BallinVille
@BallinVille 4 года назад
-bash: /mnt/recovery/home/ec2-user/.ssh/authorized_keys: No such file or directory
@liiliiliiliil
@liiliiliiliil 7 лет назад
wtf does aws have to be complicated? lol
@luciawayne9288
@luciawayne9288 3 года назад
like I should do something to stop the flow of time #Keecrack on IG It’s just a wonderful experience. Thanks for your time,.
Далее
НЕ БУДИТЕ КОТЯТ#cat
00:21
Просмотров 1,1 млн
The Problem With Microservices
17:47
Просмотров 434 тыс.
Tech Talk: What is Public Key Infrastructure (PKI)?
9:22
Containers vs VMs: What's the difference?
8:08
Просмотров 763 тыс.
How to connect to EC2 w/ PuTTY (Windows)
4:19
Просмотров 518 тыс.
How to Change Amazon Web Services EC2 Key Pair
16:16
Просмотров 49 тыс.
Postgres just got even faster
26:42
Просмотров 33 тыс.