Skip to main content
PUT
Replace registered SSH public keys

Authorizations

Authorization
string
header
required

Runpod API key authentication. Generate an API key in the Runpod console and send it in the Authorization header as Bearer <api_key>. Keys are scoped to the permissions granted when created; requests may return 403 when a valid key lacks access to the requested resource or action.

Body

application/json
keys
string[]
required

The full set of SSH public keys to register — this is a complete replacement, not a merge. Each entry is an authorized_keys-style line: <type> <base64-key> [comment], e.g. from ~/.ssh/id_ed25519.pub. Send [] to remove all keys. These keys are provisioned into pods created with startSsh and authenticate both SSH paths reported in the pod's ssh block.

Pattern: ^(ssh|ecdsa|sk)-[^\s]+ [^\s]+([ \t][^\n\r]*)?$
Example:

Response

OK — the updated key set

keys
string[]
required

The account's registered SSH public keys, one authorized_keys-style entry per element (<type> <base64-key> [comment]).

Example: