Google Cloud - Recovering SSH access

Sdílet
Vložit
  • čas přidán 5. 09. 2024
  • 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

Komentáře • 22