SSH keys

Save public keys once and add them to servers when you deploy or rebuild.

SSH keys belong to a workspace, so everyone in it can add them to servers. You pick which keys to add when you deploy or rebuild a server.

Supported keys#

Paste one line from a .pub file. These types are accepted:

  • ssh-ed25519 (recommended)
  • ssh-rsa
  • ecdsa-sha2-…

The name defaults to the comment at the end of the key, usually you@host.

Removing a key#

Removing a key from the workspace stops it being offered for new servers. It doesn’t remove it from servers that already have it. To lock someone out of a server, delete their key from ~/.ssh/authorized_keys on the server itself.

From the API#

Keys need ssh_keys:read to list and ssh_keys:write to add or remove:

curl -X POST "$API/ssh-keys" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"publicKey\": \"$(cat ~/.ssh/id_ed25519.pub)\"}"