Google Cloud - Recovering SSH access

  Рет қаралды 4,452

Erik Fredericks

Erik Fredericks

Күн бұрын

Oops, you forgot to unblock SSH/port 22 and now you're locked out. Here's what you can do to recover it. First you'll need to get up and running with the Serial console (cloud.google.c....
Short steps:
1. Shut the machine off
2. Edit it and click the checkbox for remote access via the serial console
3. Add the bash script mentioned in the link above, replacing USERNAME with your Google Cloud username and password with a temporary one
4. Save it, turn on your machine, connect via serial console, login with the username/pw you just added
5. sudo ufw allow 22
6. shut off, edit machine again, disable serial and remove bash script, done

Пікірлер: 24
@4lmolly
@4lmolly Жыл бұрын
It's always the accounts with small subscribers that usually have the solutions to problems. Thank you Erik. Solved a problem of over 2 months. I just used to create a new virtual machine.
@erikfredericks
@erikfredericks Жыл бұрын
Glad I could help! This is something that always crops up during classes
@chijokeakaliro1086
@chijokeakaliro1086 4 ай бұрын
Sir please does this mean I can log in the vps now on any terminal like bitvise or purity ? With that user name and pass ?
@jackwilliams7818
@jackwilliams7818 Ай бұрын
This solution saved me money thank you!
@TejasPaliya
@TejasPaliya 3 ай бұрын
thanks bro. you are a lifesaver
@annanevesdevops
@annanevesdevops 7 ай бұрын
you have no idea how you saved me rn, thank you!
@noor-ul-qumar3078
@noor-ul-qumar3078 5 ай бұрын
thanks a lot, very helpful, keep going, best of luck
@GizmoHey
@GizmoHey 4 ай бұрын
Thank you so much you're a life saver
@SameerPanda006
@SameerPanda006 Жыл бұрын
It worked for me. Great Job!
@erikfredericks
@erikfredericks Жыл бұрын
Good to hear!
@Muslitoo
@Muslitoo Жыл бұрын
Worked, u are a life saver thank you :D
@Ekowreelstudios
@Ekowreelstudios 2 ай бұрын
Thanks for this. in my case i mistakenly deleted my default service account and when i try accessing my SSH i get IAM permissions Test skipped. service account does not exist. anyway you can help?
@erikfredericks
@erikfredericks 2 ай бұрын
I've got to imagine you could create a new service account in IAM and assign it to the VM?
@kabeerahamed123
@kabeerahamed123 27 күн бұрын
Thanks lot
@EffortVisuals
@EffortVisuals 8 ай бұрын
Sorry... how do I even enable ssh like you show in 2:57 if I'm not able to login?
@narendrakumarv3647
@narendrakumarv3647 Жыл бұрын
Its worked perfectly :)
@EnterTVainment-ev9xz
@EnterTVainment-ev9xz 10 күн бұрын
love you❤❤❤❤
@temesgentsegaye2231
@temesgentsegaye2231 10 ай бұрын
I can't thank you enough
@yashbarodiya8121
@yashbarodiya8121 Ай бұрын
Hi brother, when i tried to connect serial console page keeps on loading .. but not connecting me to serial console .. can you give a solution
@erikfredericks
@erikfredericks Ай бұрын
Possible that either you didn't enable serial access in the settings, that there's a bug in the script or username/password combo, or that perhaps there's an operating system issue? If you aren't worried about anything on the VM it might be easier to delete and recreate it (you'd lose any data on it that way though, but if it's a fresh one then not a huge deal IMO)
@rayiuxd7833
@rayiuxd7833 5 ай бұрын
yo bro, idk if youre still there, but man, im using a VM with a ubuntu shape, I did the same thing as you but it wont let me type the password, and i get some issues like failed to start login service or no space left on device, i dont know what to do
@erikfredericks
@erikfredericks 5 ай бұрын
No space left on device sounds like a hard drive issue, or perhaps a partition got filled up. Is there anything critical on the VM? Might be one of those times where it's easier to just create a new one...
SSH into Remote VM with VS Code | Tunneling into any cloud | GCP Demo
10:26
How to Create a Virtual Machine (VM) on Google Cloud Platform (GCP)
10:34
Kahan Data Solutions
Рет қаралды 57 М.
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,3 МЛН
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33
火影忍者一家
Рет қаралды 125 МЛН
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 45 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 726 М.
Google Cloud Platform (GCP) - How To SSH into your VM
16:03
Cloud Monkey
Рет қаралды 89 М.
GOOGLE CLOUD CONSOLE/SHELL OPEN SSH USING GCLOUD
10:57
TrinityRO
Рет қаралды 2,2 М.
Connect via PuTTY to Linux VM on Google Cloud
7:25
storagefreak
Рет қаралды 77 М.
EVE NG Community Edition in Google Cloud Platform
15:16
NetSec Boy
Рет қаралды 2,2 М.
Resolve "unable to connect to the VM on port 22" error - GCP VM
7:28
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,3 МЛН