---
title: "Get SSH access"
method: POST
path: "/v1/replica/{id}/ssh-token"
tags: ["Commands and terminals"]
---

# Get SSH access

`POST /v1/replica/{id}/ssh-token`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/replica/{id}/ssh-token`
- Auth: HTTP bearer

Returns a short-lived token and proxy command for SSH. The [CLI](/features/cli) runs this for you. The replica must be active.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Response `200`

Success

- SshTokenResponse
  - `token` string, required: Short-lived token used as the SSH username.
  - `host` string, required: Workspace SSH host.
  - `proxy_command` string: Optional OpenSSH ProxyCommand for CLI clients.
  - `transport` SshWebSocketTransport
    - `type` 'websocket', required
    - `url` string, uri, required: Secure WebSocket URL for the SSH transport.
    - `headers` object: Provider credentials sent only during the WebSocket upgrade.

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - The authenticated account cannot access this resource
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
