---
title: "Configure box SSH key"
method: POST
path: "/boxes/{boxId}/sshkey"
tags: ["Box"]
---

# Configure box SSH key

`POST /boxes/{boxId}/sshkey`

Adds an OpenSSH public key to the running Box so the caller can SSH as user `user`.

## Path parameters

- `boxId` string, required

## Request body

- SshKeyRequest
  - `key` string, required — Public SSH key in OpenSSH format. Private keys are rejected.

## Response `200`

SSH key setup result.

- SshKeyResponse
  - `ok` boolean, required
  - `type` string, required — Stable success envelope discriminator added by v1.
  - `success` boolean
  - `machineIp` string, nullable
  - `sshUser` string

## Other responses

- `400` — Invalid request body or parameters.
- `401` — Missing or invalid bearer token.
- `402` — Account cannot currently create or operate Boxes. The error body may include a dashboard billing URL, but billing actions are not part of the v1 API.
- `404` — Resource not found.

---

[API](https://skmtc.dev/ascii/apis/box-public-api-v1.md) · [All operations](https://skmtc.dev/ascii/apis/box-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ascii/box-public-api-v1/revisions/82d576f82046/schema)
