Remediation
From Google Cloud Consoleβ
- Go to the
VM instances
page by visiting: https://console.cloud.google.com/compute/instances. It will list all the instances in your project. - Click on the name of the Impacted instance
- Click
Edit
in the toolbar - Under SSH Keys, go to the
Block project-wide SSH keys
checkbox - To block users with project-wide SSH keys from connecting to this instance, select
Block project-wide SSH keys
- Click
Save
at the bottom of the page - Repeat steps for every impacted Instance
From Google Cloud CLIβ
To block project-wide public SSH keys, set the metadata value to TRUE
:
gcloud compute instances add-metadata <INSTANCE_NAME> --metadata block-project-ssh-keys=TRUE