Google Cloud - Recovering SSH access

Поделиться
HTML-код
  • Опубликовано: 6 фев 2023
  • 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.com/compute/docs....
    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

Комментарии • 17

  • @TejasPaliya
    @TejasPaliya Месяц назад

    thanks bro. you are a lifesaver

  • @4lmolly
    @4lmolly Год назад +2

    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 2 месяца назад

      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 ?

  • @annanevesdevops
    @annanevesdevops 4 месяца назад

    you have no idea how you saved me rn, thank you!

  • @Muslitoo
    @Muslitoo 9 месяцев назад

    Worked, u are a life saver thank you :D

  • @noor-ul-qumar3078
    @noor-ul-qumar3078 3 месяца назад

    thanks a lot, very helpful, keep going, best of luck

  • @GizmoHey
    @GizmoHey Месяц назад

    Thank you so much you're a life saver

  • @narendrakumarv3647
    @narendrakumarv3647 10 месяцев назад

    Its worked perfectly :)

  • @SameerPanda006
    @SameerPanda006 Год назад

    It worked for me. Great Job!

  • @temesgentsegaye2231
    @temesgentsegaye2231 8 месяцев назад

    I can't thank you enough

  • @EffortVisuals
    @EffortVisuals 6 месяцев назад

    Sorry... how do I even enable ssh like you show in 2:57 if I'm not able to login?

  • @rayiuxd7833
    @rayiuxd7833 2 месяца назад

    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  2 месяца назад

      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...