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

**Set up SSH for an agent.** Add your public key to the environment's web user and get ready-made ssh, sftp, rsync and database tunnel lines with the host keys to trust. The key works once the change has applied (the task completes then). Scope: write. Long-running: answers with a task.

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

## When to use it

Add your public key to the environment's web user and get ready-made ssh, sftp, rsync and database tunnel lines with the host keys to trust. The key works once the change has applied (the task completes then).

## Inputs

- `site_id` (integer, ≥ 1, required)
- `public_key` (string, 1–20000 characters, required)
- `label` (string, up to 255 characters): The key's name in the Control Panel. Default: "Agent key".
- `login` (`web` or `me`; only while `ssh_keys` is on): `web` (default) is the environment's shared web user. `me` makes the key your personal key and answers your own login as `user`, with the lines built for it; a personal key works everywhere you have access, so a token limited to some sites cannot use `me`.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "label": {
      "description": "The key's name in the control panel. Default: \"Agent key\".",
      "maxLength": 255,
      "type": "string"
    },
    "login": {
      "description": "web (default): the shared web user. me: your personal login; the key works everywhere you have access.",
      "enum": [
        "web",
        "me"
      ],
      "type": "string"
    },
    "public_key": {
      "maxLength": 20000,
      "minLength": 1,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "public_key"
  ],
  "type": "object"
}
```

## Refusals

- `pin_refused`: `login: "me"` with a token limited to some sites (a personal key reaches every environment you reach); ask for "Everything in your company", or use `web`.
- `ssh_handle_missing` / `ssh_login_unavailable`: you have no login of your own yet, or it cannot be used on this environment now (`login: "me"`); use `web`.
- `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_quick_setup",
  "arguments": {
    "site_id": 4211,
    "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGd1aWRlLWV4YW1wbGUta2V5LW9ubHktbm90LXJlYWw deploy@example.co.uk",
    "label": "Agent key"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_ssh_quick_setup with site_id 4211, public_key ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGd1aWRlLWV4YW1wbGUta2V5LW9ubHktbm90LXJlYWw deploy@example.co.uk, label Agent key. (Set up SSH for an agent.) Tell me what it returned.
```

## The same task elsewhere

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