CorefinityCorefinityDocs
Open the Control PanelControl Panel
SSH keys · 6 of 14

Get an environment's host keys

Answers the host keys the environment presents, as fingerprints and as known_hosts lines, the latest rotation and whether you can rotate them. Only public keys are ever answered.

GET/api/environments/{environment}/ssh/host-keys

Path parameters

environmentintegerRequired

The id of a CoreStack Enterprise environment. Not the same number as a site row id. At least 1.

Returns

200 The environment's host keys.

Fields of the 200 answer
environmentobjectRequired

An environment, with the website and company it belongs to.

Fields
companyobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
idintegerRequired

The environment id, the {environment} these endpoints take and the owner.id of an environment key.

namestringRequired
productstringRequired

cse is CoreStack Enterprise.

csecorestackcorecluster
site_idinteger or nullRequired

The site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.

websiteobjectRequired
Fields
idintegerRequired

At least 1.

namestringRequired
host_keysobjectRequired

The host keys an SSH client checks when it connects.

Fields
changed_atstring or nullRequired

Format: date-time.

currentarray of objectsRequired
Fields of each item
fingerprintstringRequired
typestringRequired
ed25519ecdsarsa
known_hostsarray of stringsRequired

Complete known_hosts lines for this environment. Public keys only.

managed_bystringRequired

panel host keys can be rotated here. corefinity host keys (CoreStack Enterprise) are read-only.

panelcorefinity
nextarray of objects or nullRequired

The host keys a staged rotation will switch to. Null when no rotation is staged.

Fields of each item
fingerprintstringRequired
typestringRequired
ed25519ecdsarsa
reasonstring or nullRequired

Why rotatable is false.

unmanagedplatform_updateswitched_offin_progressnull
rotatablebooleanRequired
rotationobject or any or nullRequired

The latest rotation. Null when there has been none.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404feature_offThis feature is not on for your organisation yet.
404not_foundNot found.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/environments/1311/ssh/host-keys \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "environment": {
    "company": {
      "id": 1204,
      "name": "Harbour & Finch"
    },
    "id": 1311,
    "name": "Production",
    "product": "corecluster",
    "site_id": 1042,
    "website": {
      "id": 1310,
      "name": "Harbour & Finch trade"
    }
  },
  "host_keys": {
    "changed_at": "2026-11-02T01:12:40+00:00",
    "current": [
      {
        "fingerprint": "SHA256:ExampleHostKeyEd25519FingerprintNotARealOne",
        "type": "ed25519"
      },
      {
        "fingerprint": "SHA256:ExampleHostKeyEcdsaFingerprintNotARealOne00",
        "type": "ecdsa"
      },
      {
        "fingerprint": "SHA256:ExampleHostKeyRsaFingerprintNotARealOne0000",
        "type": "rsa"
      }
    ],
    "known_hosts": [
      "[ssh-northwind.example.net]:21044 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAAAExampleHostKeyOnlyThisIsNotARealHostKey1",
      "[ssh-northwind.example.net]:21044 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBExampleHostKeyOnlyThisIsNotARealHostKey2ExampleHostKeyOnlyThisIsNotARealHostKey2Exampl=",
      "[ssh-northwind.example.net]:21044 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQExampleHostKeyOnlyThisIsNotARealHostKey3ExampleHostKeyOnlyThisIsNotARealHostKey3ExampleHostKeyOnlyThisIsNotARealHostKey3"
    ],
    "managed_by": "panel",
    "next": null
  },
  "reason": null,
  "rotatable": true,
  "rotation": null
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT