Skip to main content
SSH key credentials store public keys that are deployed to servers during cluster provisioning. You can either provide your own public key or let Ankra generate a keypair for you. They’re required for self-managed clusters on providers such as Hetzner, OVH, DigitalOcean, UpCloud, Scaleway (closed beta), AWS EC2, Ankra Cloud (closed beta), Proxmox, and Morpheus.

Creating an SSH Key Credential

1

Choose an approach

  • Bring your own key: provide an existing SSH public key
  • Generate a keypair: create a new keypair and save the private key, which you only get once
2

Add it to Ankra

Go to Integrations & alerts → Credentials, click Add credential, and under Git, registries and keys choose SSH key. In Add an SSH key, enter a Name and pick the Key source:
  • Use an existing key: paste your Public key (for example ssh-ed25519 AAAA…) and click Save public key. Never paste a private key. The credential’s page opens.
  • Generate a new key: click Generate and save public key. Your browser generates a 4096-bit RSA key pair and Ankra receives only the public key. Click Download <name>.pem, tick I have downloaded and stored the private key safely, and click Done. Closing the page before that discards the private key.
On the credential’s page, Validate the public key → Check now checks the stored key’s format; it does not test access to a server.
3

Or via CLI

An SSH key credential belongs to the whole organisation, so one credential can be attached to clusters on any provider.
With --generate the platform generates an RSA key pair and returns the private key once, written to the file you name.The provider-named routes, such as ankra credentials hetzner ssh-key create --name my-key --generate, create the same organisation-wide credential and still work.
When generating a keypair, the private key is only returned once. Save it immediately to a secure location.

Listing SSH Key Credentials

Attach a key to a cluster

  1. Go to Infrastructure → Clusters → <your cluster> → Settings → SSH access.
  2. Under SSH keys, choose a saved key in Add an SSH key. Repeat for each key.
  3. Click Review and save…, then Save SSH keys. The servers accept exactly these keys from the next time Ankra brings the cluster in line with its settings.
Changing the keys needs the clusters.write permission.