SSH keys
SSH keys are how you log into Linux VMs after they boot. Register a key under your user, then name it in sshs when you create a VM; cloud-init writes it into the default user's ~/.ssh/authorized_keys.
How it works
There are two ways to register a key:
POST /api/v1/ssh/add_publicwith anameand yourssh_public_key. You send the public key only; the private key stays with you.POST /api/v1/ssh/with anamegenerates a key pair and returns itsprivate_keyonce. Save it then: the API never shows it again.
A VM gets the one key you name in sshs when you create it. At boot, the metadata service exposes that public key to cloud-init, which writes it into the default user's authorized_keys file.
Keys added after a VM boots are not automatically pushed to running VMs. A VM keeps the key it was created with, so add a new key inside the VM with your usual config management.
Supported formats
The key string must be in OpenSSH format — the single line starting with ssh-ed25519, ecdsa-sha2-nistp..., or ssh-rsa, followed by the base64-encoded key material, optionally followed by a comment. That's what ~/.ssh/id_*.pub files contain by default.
Fingerprints + duplicates
Each key has a stable SHA256 fingerprint. GET /api/v1/ssh/ lists your keys with their fingerprint and public key. Key names must be unique among your keys: registering a second key under a name you already use answers 409.
Removing a key
DELETE /api/v1/ssh/ with the key's id in ssh_keys deletes it, so new VMs can't use it. Already-booted VMs keep the key in their authorized_keys file — cloud-init isn't a state-reconciler, it's a first-boot installer. To revoke a key from running VMs, either:
- Recreate the VMs with a different key in
sshs, or - Edit
~/.ssh/authorized_keysinside the VM directly (or via your config management).
What's next
- Virtual machines — VMs use these keys at boot.
- Authentication — API keys are for the management API, not VM login. The SSH-key endpoints take a signed-in session, not an API key.