๐ก๏ธ Google GCE Instance Block Project-Wide SSH Keys is not enabled๐ข
- Contextual name: ๐ก๏ธ Instance Block Project-Wide SSH Keys is not enabled๐ข
- ID:
/ce/ca/google/compute-engine/instance-project-wide-ssh-key - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- Cloud Conformity: Enable 'Block Project-Wide SSH Keys' Security Feature
Descriptionโ
Descriptionโ
It is recommended to use instance-specific SSH keys instead of common or shared project-wide SSH keys to access instances.
Rationaleโ
Project-wide SSH keys are stored in Compute project metadata. Project-wide SSH keys can be used to log in to all instances within a project. Using project-wide SSH keys eases SSH key management, but if compromised, it poses a security risk that can impact all instances within the project. It is recommended to use instance-specific SSH keys to limit the attack surface if SSH keys are compromised.
Impactโ
Users who already have project-wide SSH key pairs and use third-party SSH clients will lose access to affected instances. For project users using gcloud or the GCP Console-based SSH option, no manual key creation and distribution is required and will be handled by GCE (Google Compute Engine). To access instances using third-party SSH clients, instance-specific SSH key pairs need to be created and distributed to the required users.
Auditโ
From Google Cloud Consoleโ
... see more
Remediationโ
Remediationโ
From Google Cloud Consoleโ
- Go to the
VM instancespage 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
Editin the toolbar- Under SSH Keys, go to the
Block project-wide SSH keyscheckbox- To block users with project-wide SSH keys from connecting to this instance, select
Block project-wide SSH keys- Click
Saveat 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