> ## Documentation Index
> Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage SSH Keys with AI Agents

> Use MCP tools to list, audit, and manage SSH keys in your workspace — all through conversation with your AI agent.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Your AI agent can list SSH keys in your workspace, help you identify old or unused keys, and guide you through key management.

***

## "Show me all the SSH keys in my workspace."

The agent lists your keys:

1. **`list_ssh_keys`** — returns all SSH keys with metadata

> You have 4 SSH keys in your workspace:
>
> | Name        | Type     | Fingerprint      | Added        |
> | ----------- | -------- | ---------------- | ------------ |
> | macbook-pro | ed25519  | SHA256:xK9...mN2 | 3 months ago |
> | ci-deploy   | rsa-4096 | SHA256:aB3...pQ7 | 6 months ago |
> | old-laptop  | ed25519  | SHA256:rT1...wX4 | 1 year ago   |
> | team-shared | rsa-2048 | SHA256:kL5...jH8 | 8 months ago |
>
> **old-laptop** is over a year old. If you no longer use that machine, consider removing it.
> **team-shared** uses RSA-2048 — ed25519 is recommended for new keys.

***

## "Which keys can access my running instances right now?"

The agent cross-references keys with instances:

1. **`list_ssh_keys`** — gets all workspace keys
2. **`list_instances`** — gets all running instances

> All 4 workspace SSH keys are authorized on your 2 running instances:
>
> | Instance     | GPU      | Keys with access                                |
> | ------------ | -------- | ----------------------------------------------- |
> | training-run | A100     | macbook-pro, ci-deploy, old-laptop, team-shared |
> | dev-box      | RTX 4090 | macbook-pro, ci-deploy, old-laptop, team-shared |
>
> Every key in the workspace can SSH into every instance. If **old-laptop** is compromised or no longer in use, removing it reduces your attack surface.
>
> To remove a key or add a new one, use the [SSH Keys page](/account/ssh-keys) in the dashboard.

***

## "I just set up a new workstation. Walk me through adding its SSH key."

The agent guides you through the process:

1. **`list_ssh_keys`** — shows current keys to avoid duplicates

> Here's how to add your new workstation's SSH key:
>
> **Step 1:** Generate a key if you don't have one:
>
> ```bash theme={"theme":"github-dark"}
> ssh-keygen -t ed25519 -C "workstation"
> ```
>
> **Step 2:** Copy the public key:
>
> ```bash theme={"theme":"github-dark"}
> cat ~/.ssh/id_ed25519.pub
> ```
>
> **Step 3:** Add it in the dashboard at [SSH Keys](/account/ssh-keys) — paste the public key and give it a name like `workstation`.
>
> Once added, the key is automatically authorized on all current and future instances in this workspace. You currently have 4 other keys — the new one will be number 5.

<Note>SSH key creation and deletion are managed through the dashboard. The MCP `list_ssh_keys` tool provides read-only access to your key inventory.</Note>

***

## Tools used in this workflow

| Tool             | Purpose                                     |
| ---------------- | ------------------------------------------- |
| `list_ssh_keys`  | List all SSH keys and their metadata        |
| `list_instances` | Cross-reference keys with running instances |
