Skip to Content
SSH keys

SSH keys

Keys live on your account, not on individual servers, and they are installed during a re-image.

Adding a key does not change any running server. A re-image is the only point at which keys reach a machine — so after adding one, re-image the server you want to use it on.

That is a deliberate limitation: we do not hold credentials that would let us log into your servers and edit authorized_keys behind your back.

Listing keys

curl https://braesystems.com/api/v1/ssh-keys \ -H "Authorization: Bearer bs_live_..."
{ "data": [ { "id": "7a6b5c4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d", "name": "work-laptop", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDjG7RPA1EpqDMvKeai1v1ibjWe2ZBKQRqIEB3PvLJgq you@example.com", "fingerprint": "SHA256:qqLkC/YxINXheBw7fxT6z9s92H80dJJkSIuDy3d/GJs", "created_at": "2026-07-20T12:00:00.000Z" } ] }

Adding a key

Send the public half — the contents of a .pub file. Reading it from disk rather than pasting it is worth the extra line: a key that picks up a stray line break on the way through a clipboard is rejected, and the reason is not obvious from the error.

curl -X POST https://braesystems.com/api/v1/ssh-keys \ -H "Authorization: Bearer bs_live_..." \ -H "Content-Type: application/json" \ -d "{\"name\": \"work-laptop\", \"public_key\": \"$(cat ~/.ssh/id_ed25519.pub)\"}"

Supported types: ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256/384/521, and the sk- hardware-backed variants. Ed25519 is the sensible default.

Keys are validated on the way in, not on the way out to a server. Beyond checking the format, we verify that the algorithm named at the front of the key matches the one encoded inside its body — a mismatch means the key is malformed or hand-edited, and would be silently accepted here only to be rejected by sshd at your first login attempt.

The stored key is normalised, so pasting the same key twice with different whitespace or a different trailing comment is recognised as a duplicate (409 duplicate-ssh-key) rather than creating two rows.

Errors

ResponseCause
400 invalid-requestMissing name or public_key, or a name longer than 64 characters.
400 invalid-ssh-keyNot a public key we can parse — including a private key pasted by mistake.
409 duplicate-ssh-keyA key with this fingerprint is already on the account.

Deleting a key

curl -X DELETE https://braesystems.com/api/v1/ssh-keys/$SSH_KEY_ID \ -H "Authorization: Bearer bs_live_..."

Returns 204. Servers already carrying the key keep it until they are re-imaged — deleting a key does not lock anyone out of a running machine.

Deleting your last key means the next re-image has no key to install, and the request will be rejected. Keep at least one.

Last updated on