---
title: "corestack_ssh_user_delete"
url: https://docs.corefinity.com/mcp/tools/corestack_ssh_user_delete
type: tool
last_updated: 2026-11-13
feature: access
related:
  - https://docs.corefinity.com/guides/sites/access-and-security/connection-details.md
---
# corestack_ssh_user_delete

**Delete an SSH user.** Delete a named SSH or SFTP user and its keys from the environment. The built-in web user cannot be deleted. Scope: write. Long-running: answers with a task.

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

## When to use it

Delete a named SSH or SFTP user and its keys from the environment. The built-in web user cannot be deleted.

## Inputs

- `user_id` (integer, ≥ 1, required)
- `confirm_username` (string, up to 100 characters; only while `ssh_keys` is on): Optional: the user's username, to confirm the deletion. When sent it must match exactly.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "confirm_username": {
      "description": "Optional; when sent, must match the user's username exactly.",
      "maxLength": 100,
      "type": "string"
    },
    "user_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "user_id"
  ],
  "type": "object"
}
```

## Refusals

- `confirm_mismatch`: the typed username does not match; nothing changed. Leave the field out to skip the check.
- `ssh_person_managed_elsewhere`: the user is a person's own SSH login, managed in their profile (while `ssh_keys` is on).
- `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.
- 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).

## Example

```json
{
  "name": "corestack_ssh_user_delete",
  "arguments": {
    "user_id": 5021
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_ssh_user_delete with user_id 5021. (Delete an SSH user.) Tell me what it returned.
```

## The same task elsewhere

- Guide: [Connection details](https://docs.corefinity.com/guides/sites/access-and-security/connection-details.md)
