SSH keys
We let you upload SSH public keys to your account and reference them by
id when provisioning. Keys you register here get added to
/root/.ssh/authorized_keys on any new VPS you create.
Why this exists
Without uploaded keys, a new VPS provisions with a random root password
which you have to reveal via revealServerPassword (audit-logged) and
then use to log in once before disabling password auth. With keys
registered, you skip that — the new server is reachable by SSH
immediately, no password needed.
Format
OpenSSH wire format — what's in ~/.ssh/id_ed25519.pub or
~/.ssh/id_rsa.pub:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM...UlrW user@laptop
We accept ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256,
ecdsa-sha2-nistp384, ecdsa-sha2-nistp521. Use ssh-ed25519 if
you're generating a new key today.
We never accept or store private keys. If you accidentally paste one, nothing terrible happens — we just reject it as not parseable.
Add a key
curl https://api.vps-server.host/v1/ssh-keys \
-H "Authorization: Bearer $VPSH_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg key "$(cat ~/.ssh/id_ed25519.pub)" '{
name: "laptop-2026",
public_key: $key
}')"
vpsctl ssh-keys create --name laptop-2026 --key-file ~/.ssh/id_ed25519.pub
The response includes the id (looks like key_01HRZQ...), the
fingerprint (SHA-256), and the detected algorithm. The id is what
you pass to createServer, createOrder, and rebuildServer.
List keys
vpsctl ssh-keys list
Use a key when provisioning
Pass the key id in the ssh_keys[] array:
vpsctl servers create \
--product-id 24 \
--billing-cycle monthly \
--ssh-key key_01HRZQ... \
--ssh-key key_02HRZR... \
...
Multiple keys are OK — every one in ssh_keys[] ends up in the
server's authorized_keys.
Rename or delete
vpsctl ssh-keys rename key_01HRZQ... --name laptop-2026-rotated
vpsctl ssh-keys delete key_01HRZQ...
Delete only affects future provisioning. Servers already provisioned
with this key keep it in their authorized_keys. To remove a key from
running servers, edit /root/.ssh/authorized_keys directly (via
configuration management or one-off SSH).
Key rotation
To rotate a key safely:
createSshKeywith the new public key, under a new name.- Provision new servers with the new key (or add it to existing servers via your config management).
deleteSshKeyfor the old one once you're sure nothing depends on it.
The key material is immutable — there is no "update public key" endpoint. Always create + delete.
MCP tools
| API | MCP tool |
|---|---|
GET /ssh-keys | list_ssh_keys |
GET /ssh-keys/{id} | get_ssh_key |
POST /ssh-keys | create_ssh_key |
PATCH /ssh-keys/{id} | rename_ssh_key |
DELETE /ssh-keys/{id} | delete_ssh_key (destructive — asks for confirmation) |