Google Cloud - Recovering SSH access

แชร์
ฝัง
  • เผยแพร่เมื่อ 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

ความคิดเห็น • 16

  • @GizmoHey
    @GizmoHey 5 วันที่ผ่านมา

    Thank you so much you're a life saver

  • @noor-ul-qumar3078
    @noor-ul-qumar3078 หลายเดือนก่อน

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

  • @tobiomole04
    @tobiomole04 10 หลายเดือนก่อน +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  10 หลายเดือนก่อน

      Glad I could help! This is something that always crops up during classes

    • @chijokeakaliro1086
      @chijokeakaliro1086 18 วันที่ผ่านมา

      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 ?

  • @annaneves1892
    @annaneves1892 3 หลายเดือนก่อน

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

  • @Muslitoo
    @Muslitoo 8 หลายเดือนก่อน

    Worked, u are a life saver thank you :D

  • @narendrakumarv3647
    @narendrakumarv3647 8 หลายเดือนก่อน

    Its worked perfectly :)

  • @SameerPanda006
    @SameerPanda006 ปีที่แล้ว

    It worked for me. Great Job!

  • @temesgentsegaye2231
    @temesgentsegaye2231 6 หลายเดือนก่อน

    I can't thank you enough

  • @EffortVisuals
    @EffortVisuals 4 หลายเดือนก่อน

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

  • @rayiuxd7833
    @rayiuxd7833 หลายเดือนก่อน

    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  หลายเดือนก่อน

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