---
title: "corestack_ssh_user_create"
url: https://docs.corefinity.com/mcp/tools/corestack_ssh_user_create
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_create

**Create an SSH user.** Create a named SSH or SFTP user on the environment, optionally confined to a root path, with a password set, generated or none (keys can be added with corestack_ssh_user_key_add). The change applies in the background. Scope: write. Also needs exec when reveal_to_agent is true. Long-running: answers with a task. The secret opens in the person's browser; set reveal_to_agent to true to receive it yourself (needs exec).

- Scope: `write`
- Also needs `exec` when a generated password
- Runs as a task: yes
- Returns a secret only when `reveal_to_agent` is set

## When to use it

Create a named SSH or SFTP user on the environment, optionally confined to a root path, with a password set, generated or none (keys can be added with corestack_ssh_user_key_add). The change applies in the background.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `username` (string, 1–64 characters, required)
- `type` (one of `ssh`, `sftp`, required)
- `root_path` (string, up to 255 characters)
- `label` (string, up to 255 characters)
- `password` (one of `generate`, `set`, `none`, default `"none"`)
- `password_value` (string, up to 256 characters): With password set.
- `reveal_to_agent` (boolean, default `false`): Return the secret to you instead of opening it in the person's browser. Needs exec.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "label": {
      "maxLength": 255,
      "type": "string"
    },
    "password": {
      "default": "none",
      "enum": [
        "generate",
        "set",
        "none"
      ],
      "type": "string"
    },
    "password_value": {
      "description": "With password set.",
      "maxLength": 256,
      "type": "string"
    },
    "reveal_to_agent": {
      "default": false,
      "description": "Return the secret to you instead of opening it in the person's browser. Needs exec.",
      "type": "boolean"
    },
    "root_path": {
      "maxLength": 255,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "type": {
      "enum": [
        "ssh",
        "sftp"
      ],
      "type": "string"
    },
    "username": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "site_id",
    "username",
    "type"
  ],
  "type": "object"
}
```

## Refusals

- `tenant_mismatch` also answers a purged site: its SSH access ended with it, and its port may already be another site's.
- `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_create",
  "arguments": {
    "site_id": 4211,
    "username": "deploy",
    "type": "ssh"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_ssh_user_create with site_id 4211, username deploy, type ssh. (Create 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)
