---
title: "corestack_ssh_key_remove"
url: https://docs.corefinity.com/mcp/tools/corestack_ssh_key_remove
type: tool
last_updated: 2026-11-13
feature: ssh-keys
related:
  - https://docs.corefinity.com/api/reference/access/delete-ssh-key.md
  - https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md
---
# corestack_ssh_key_remove

**Revoke an SSH public key.** Removes an SSH key (confirm_fingerprint typed). Done when every environment it reached stops accepting it; remaining_sources lists other grants that still allow the same key. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Confirmation: `confirm_fingerprint`
- Runs as a task: yes

## When to use it

Remove an SSH key. Type its fingerprint as `confirm_fingerprint` exactly as corestack_ssh_keys_list shows it. Long-running: completes only once every environment it reached has stopped accepting it; until then it reads `removing`. `remaining_sources` lists other grants that still allow the same key.

## Inputs

- `key_id` (integer, required)
- `confirm_fingerprint` (string, required): the key's `SHA256:` fingerprint.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_fingerprint": {
      "description": "Type the key's fingerprint exactly as corestack_ssh_keys_list shows it (SHA256:…).",
      "maxLength": 60,
      "minLength": 1,
      "type": "string"
    },
    "key_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "key_id",
    "confirm_fingerprint"
  ],
  "type": "object"
}
```

## Refusals

- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- `forbidden`: a company's key and the person's role holds neither the Delete Company SSH Keys nor the Edit Company SSH
  Keys permission (either one removes it). The message names both and says an owner of the company can grant them in
  Roles; `details.permission` is `deleteCompanySSHKeys`. Nothing is changed.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).
- `switched_off`: SSH keys are not switched on for this object yet.
- `confirm_mismatch`: the typed fingerprint is not this key's.
- `ssh_managed_on_another_environment`: this CoreStack Enterprise environment runs on the same server as another environment whose SSH the Control Panel manages, so its own keys are added, changed and removed there; the refusal's `managed_on` names that environment (`{id, name}`).
- `enterprise_panel_only`: SSH keys for CoreStack Enterprise environments are managed in the Control Panel only at the moment.

## Example

```json
{
  "name": "corestack_ssh_key_remove",
  "arguments": {
    "key_id": 70120,
    "confirm_fingerprint": "SHA256:KWUX5AFVTL2ZqPyXmKlo/rqDZd4jSw9JZSRPePj1S0M"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_ssh_key_remove with key_id 70120. (Revoke an SSH public key.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [DELETE /api/ssh/keys/{key}](https://docs.corefinity.com/api/reference/access/delete-ssh-key.md)
- Guide: [SSH keys](https://docs.corefinity.com/guides/sites/access-and-security/ssh-keys.md)
