Appearance
SSH keys
Save the public SSH keys you use to log into pods. Add a key once, then pick it when you create a pod instead of pasting it every time.
There is no dedicated SSH keys screen in the console - you paste or pick a key right where you need it, at pod creation. This API is how you list and delete the keys you have saved.
All endpoints need a bearer token (JWT or API key).
List keys
http
GET /api/ssh-keys/json
[
{
"id": "...",
"name": "laptop",
"publicKey": "ssh-ed25519 AAAAC3Nza... alice@laptop",
"fingerprint": "SHA256:...",
"createdAt": "..."
}
]Add a key
http
POST /api/ssh-keys/json
{
"name": "laptop",
"publicKey": "ssh-ed25519 AAAAC3Nza... alice@laptop"
}Paste the public key - the contents of ~/.ssh/id_ed25519.pub, not your private key. We compute the fingerprint for you and return 201 with the saved key.
If name is empty we fall back to the key's comment, and if there isn't one we generate a name from the fingerprint. Add a key you have already saved and we just hand back the existing one (keys are deduplicated by fingerprint), so re-adding is harmless.
Accepted key types:
ssh-rsassh-ed25519ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com(FIDO / hardware-backed keys)
Anything that is not a valid OpenSSH public-key line is rejected with 400.
Delete a key
http
DELETE /api/ssh-keys/:keyIdRemoves the key from your saved list. There is no update action - to rotate a key, delete this one and add the replacement.
Using a key on a pod
When you create a pod you can attach one of these keys so you can SSH in straight away. See Connecting via SSH for the full walkthrough.
Example
bash
curl -X POST https://cloud-api.microapps.io/api/ssh-keys/ \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"name\":\"laptop\",\"publicKey\":\"$(cat ~/.ssh/id_ed25519.pub)\"}"