---
title: "POST /v1/{+environment}:removePublicKey"
method: POST
path: "/v1/{+environment}:removePublicKey"
tags: ["users"]
---

# POST /v1/{+environment}:removePublicKey

`POST /v1/{+environment}:removePublicKey`

Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.

## Path parameters

- `environment` string, required

## Request body

- RemovePublicKeyRequest — Request message for RemovePublicKey.
  - `key` string — Key that should be removed from the environment.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/cloudshell.md) · [All operations](https://skmtc.dev/google/apis/cloudshell/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/cloudshell/revisions/4fa0d8d99f5e/schema)
