HelipodDocs

SSH keys and access

Add and remove SSH public keys for root, and switch SSH access on or off.

On servers that share a public address (see Port forwarding), Helipod manages root's SSH keys and the SSH service for you. On every other server these routes answer 409 FEATURE_NOT_AVAILABLE; manage ~/.ssh/authorized_keys on the server itself.

Changes are applied on the running server: it must be running (409 INSTANCE_NOT_RUNNING) and not busy (409 VPS_BUSY). Nothing here costs money.

The key object

Keys are identified by their fingerprint, the same SHA256:... value that ssh-keygen -lf key.pub prints.

{
  "fingerprint": "SHA256:Xq3k8v0mJ2y5bW1uN7dE4rT9pL6hC0aZ2sF8gK1nM4o",
  "type": "ssh-ed25519",
  "comment": "ana@laptop",
  "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGx0... ana@laptop"
}

List keys

GET/vps/:id/ssh-keys
The public keys that can log in as root.
curl https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/ssh-keys \
  -H "Authorization: Bearer hel_your_key"

The response is an array of key objects. fingerprint is null for a stored line that is not a valid public key.

Add a key

POST/vps/:id/ssh-keys
Add one public key. Returns 201.

Prop

Type

curl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/ssh-keys \
  -H "Authorization: Bearer hel_your_key" \
  -H "Content-Type: application/json" \
  -d "{ \"publicKey\": \"$(cat ~/.ssh/id_ed25519.pub)\" }"
{
  "success": true,
  "data": {
    "fingerprint": "SHA256:Xq3k8v0mJ2y5bW1uN7dE4rT9pL6hC0aZ2sF8gK1nM4o",
    "keys": [
      { "fingerprint": "SHA256:Xq3k8v0mJ2y5bW1uN7dE4rT9pL6hC0aZ2sF8gK1nM4o", "type": "ssh-ed25519", "comment": "ana@laptop", "publicKey": "ssh-ed25519 AAAAC3Nz... ana@laptop" }
    ]
  }
}

Send the public key, never the private one

Anything that looks like a private key is refused with 400 PRIVATE_KEY_REJECTED before it is looked at or stored. Send the .pub file.

StatusCodeWhen
400INVALID_SSH_KEYNot a single-line public key of a supported type, or the key data does not match its type.
400PRIVATE_KEY_REJECTEDThe text is a private key.
400SSH_KEY_LIMITThe server already has 10 keys.
409SSH_KEY_EXISTSThe same key is already on the server.

Remove a key

DELETE/vps/:id/ssh-keys/:fingerprint
Remove the key with this fingerprint.

A fingerprint contains / and +, so URL-encode it, or send it in base64url form (- for +, _ for /). The SHA256: prefix is optional.

curl -X DELETE "https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/ssh-keys/SHA256%3AXq3k8v0mJ2y5bW1uN7dE4rT9pL6hC0aZ2sF8gK1nM4o" \
  -H "Authorization: Bearer hel_your_key"

The response is { "fingerprint": "SHA256:...", "deleted": true, "keys": [ ... ] } with the keys that remain. An unknown fingerprint answers 404 SSH_KEY_NOT_FOUND.

Switch SSH on or off

POST/vps/:id/ssh
Turn the server's SSH access on or off.

Prop

Type

curl -X POST https://api.helipod.io/api/vps/1f757fd5-98d1-490a-81a0-58b5798a5815/ssh \
  -H "Authorization: Bearer hel_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'
{ "success": true, "data": { "sshEnabled": false, "changed": true } }

Asking for the state the server is already in changes nothing and answers changed: false, even while the server is stopped or busy.

On this page