Tried to setup UFW or any other Firewall, but it disallows any traffic to port 22, which doesn't let you ssh to your Google Cloud Platform (GCP) instance? 😖
This article might be your savior. 😎
Follow the instructions below :
- Go to your VM’s configuration page. Select the project. Then, Go to Compute -> Compute Engine -> VM Instances. Click the VM you want to recover
- Click Edit. Then, scroll down to Custom Metadata