> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-vm-instances-have-block-project-wide-ssh-keys-feature-disabled.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP VM instances have block project-wide SSH keys feature disabled

### Synopsis

| Field               | Value                                                              |
| ------------------- | ------------------------------------------------------------------ |
| Rule Type           | Detection                                                          |
| Finding Type        | GCP VM instances have block project-wide SSH keys feature disabled |
| Finding ID          | 60000147                                                           |
| Generates a Finding | This detection rule also generates a finding                       |
| Severity            | Medium                                                             |
| Category            | CONFIGURATION                                                      |
| Cloud Providers     | GCP                                                                |
| Platform Module     | CSPM                                                               |
| Asset Types         | GOOGLE\_COMPUTE\_ENGINE\_VM\_INSTANCE                              |

### Description

GCP VM instances with the 'block project-wide SSH keys' feature disabled are vulnerable to unauthorized access. This misconfiguration allows attackers to leverage project-wide SSH keys, compromising all instances within the project if a key is stolen or leaked.

The 'block project-wide SSH keys' feature in Google Compute Engine manages SSH key access to VM instances. Disabling this feature allows the use of project-wide SSH keys stored in Compute/Project-metadata. This simplifies key management but significantly increases the attack surface; compromise of a single project-wide key grants access to all instances.

A successful attack could lead to complete compromise of all VM within the project, resulting in data breaches, service disruptions, and potential lateral movement within the GCP environment. Employing instance-specific SSH keys significantly limits the blast radius of a compromised key, making it a crucial security best practice.

To mitigate this risk, enable the 'block project-wide SSH keys' feature on all GCP VM instances. Implement a robust SSH key management system using instance-specific keys and adhere to least privilege principles, rotating keys regularly and restricting access based on the principle of least privilege.

### Remediation

1. Login to GCP Portal
2. Go to Computer Engine (Left Panel)
3. Go to VM instances
4. From the list of VMs, choose the reported VM
5. Click on Edit button
6. Under SSH Keys section, Check 'Block project-wide SSH keys' on the checkbox
7. Click on Save


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-vm-instances-have-block-project-wide-ssh-keys-feature-disabled.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
