Skip to main content
POST
Mint an SSH certificate for an agent
Issues a certificate for exactly one key source. It answers 404 when the deployment has no SSH front door. See Self-hosting for deployment options. Signs a short-lived OpenSSH user certificate that lets you SSH into the hosted agent’s sandbox. Name exactly one key source: an ed25519 public key pasted inline, or the id of a key registered at POST /user/ssh-keys. Answers 404 when the deployment has no SSH front door (see ssh in GET /instance).
Availability: Cloud · Community (self-hosted) · Enterprise (self-hosted)

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Path Parameters

agentId
string
required

Body

application/json
publicKey
string
required

An ssh-ed25519 … public key line.

Maximum string length: 1024

Response

The certificate and where to connect

certificate
string

The signed OpenSSH user certificate line (ssh-ed25519-cert-v01@openssh.com …). Save it next to your private key as <key>-cert.pub.

host
string
port
integer
user
string

The SSH username to connect as (the agent id).

serial
string
expiresAt
string<date-time>