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

Get an environment's SSH access

Answers how to connect to the environment and every key that can log in, grouped by username, with the level each key comes from. add_options lists the levels you may add a key at.

GET/api/environments/{environment}/ssh

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 SSH access.

Fields of the 200 answer
add_optionsarray of objectsRequired

The levels you may add a key at.

Fields of each item
levelstringRequired
environmentwebsitecompanyuser
loginstringRequired

The username a key added at this level logs in with.

ownerobjectRequired

Where a key is held: a company, a website, an environment or a person.

Fields
idintegerRequired

The id of the company, website, environment or user.

namestringRequired
typestringRequired
companywebsiteenvironmentuser
reachobjectRequired

How far a key reaches.

Fields
clientsintegerRequired

Client companies an agency's key reaches.

environmentsintegerRequired
websitesintegerRequired
add_refusalsarray of objectsRequired

Levels left out of add_options because your role may not add there.

Fields of each item
levelstringRequired
company
messagestringRequired
refusedstringRequired
forbidden
can_addobjectRequired

Whether you may add a key here.

Fields
allowedbooleanRequired
refusedstring or nullRequired

Why not. managed_elsewhere, which only an environment's answer gives, means the keys are managed on another environment of the same server (managed_on).

managed_elsewherenull
connectionobjectRequired

How to connect to the environment over SSH.

Fields
hoststring or nullRequired
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
portinteger or nullRequired
tunnel_targetstring or nullRequired

The host:port a database tunnel forwards to. Null when there is none.

web_commandstring or nullRequired

The ssh command for the shared web user.

your_loginobjectRequired

Your own username on this environment.

Fields
commandstring or nullRequired

The ssh command to connect with it.

deliveredbooleanRequired

True once the username works on the environment.

loginstring or nullRequired
statestringRequired

ready works now. no_key means you have no personal key yet, no_login that no username has been issued. The waiting_ states and not_switched_on mean the environment is not ready for personal usernames yet.

readywaiting_for_switch_overwaiting_for_platform_updatenot_switched_onfailedunmanagedno_keyno_login
deliveryobjectRequired

Whether the environment's keys are managed by the Control Panel, and whether the latest change is live.

Fields
applied_atstring or nullRequired

Format: date-time.

group_writestring or nullRequired

CoreStack Enterprise only; null elsewhere.

offrollingverifiednull
last_error_publicstring or nullRequired

Why the last change failed, in plain words.

modestringRequired

managed once the Control Panel manages the environment's keys.

legacymanaged
next_attempt_atstring or nullRequired

When a failed change is tried again. Format: date-time.

not_on_new_systembooleanRequired

True when the Control Panel does not manage this environment's keys and no switch-over is planned.

planned_forstring or nullRequired

When the environment is planned to switch over. Format: date-time.

statestringRequired
pendingapplyingappliedfaileddriftwaitingunmanaged
verified_atstring or nullRequired

Format: date-time.

waiting_forstring or nullRequired

What a waiting environment waits for.

adoptionplatform_updatepersons_gatecli_overridenull
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
forwardingobjectRequired

Where SSH port forwarding may connect to.

Fields
restrictedbooleanRequired
targetsarray of stringsRequired
legacyobjectRequired

The Legacy keys on the environment.

Fields
countintegerRequired
ends_onstring or nullRequired

The day they stop working. Format: date.

loginsarray of objectsRequired

Each username with its keys.

Fields of each item
keysarray of objectsRequired
Fields of each item
added_atstring or nullRequired

Format: date-time.

added_byobject or any or nullRequired
bitsinteger or nullRequired

The key size, for RSA keys.

deliveryobjectRequired

Whether the key works on this environment yet.

Fields
planned_forstring or nullRequired

When a waiting environment is planned to switch over. Format: date-time.

statestringRequired

waiting means the environment has not switched to keys managed by the Control Panel yet.

appliedapplyingremovingfailedwaiting
editablebooleanRequired

Whether you may rename the key or change where it applies.

fingerprintstringRequired

The SHA-256 fingerprint, as ssh-keygen -lf prints it.

idinteger or nullRequired

The key id the /ssh/keys/{key} endpoints take. Null for the Corefinity deploy key.

last_used_atstring or nullRequired

Format: date-time.

legacyobject or any or nullRequired

Set for a Legacy key, else null.

namestringRequired
removablebooleanRequired

Whether you may remove the key.

restrictedbooleanRequired

True when the key carries restrictions from before it was imported.

restrictionsarray of stringsRequired

The restrictions as they are written in front of the key. Read-only.

sourceobjectRequired

The level a key on an environment comes from.

Fields
layerstringRequired

agency is a key of your agency. system is the Corefinity deploy key.

agencycompanywebsiteenvironmentuserlegacysystem
ownerobject or any or nullRequired

Null for a key that has no owner you can see.

typestringRequired

The key type, such as ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521 or ssh-rsa. A key imported from a server may carry an older type (ssh-dss) or a security-key type (sk-), which new keys may not.

ssh-ed25519ecdsa-sha2-nistp256ecdsa-sha2-nistp384ecdsa-sha2-nistp521ssh-rsassh-dss[email protected][email protected]
weakbooleanRequired

True for a key that would be refused if it were added today.

kindstringRequired

web is the site's shared user. person is one person's own username.

webperson
loginstringRequired

The username.

personobject or any or nullRequired

The person, for a person username.

youbooleanRequired

True for your own username.

managed_onobject or any or nullRequired

Set when this environment shares a server with another one that manages its keys. Keys are then changed on that environment.

notesarray of stringsRequired

Sentences about the environment's state, in plain words.

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 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "add_options": [
    {
      "level": "environment",
      "login": "web",
      "owner": {
        "id": 1311,
        "name": "Production",
        "type": "environment"
      },
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      }
    },
    {
      "level": "website",
      "login": "web",
      "owner": {
        "id": 1310,
        "name": "Harbour & Finch trade",
        "type": "website"
      },
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      }
    },
    {
      "level": "company",
      "login": "web",
      "owner": {
        "id": 1204,
        "name": "Harbour & Finch",
        "type": "company"
      },
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      }
    },
    {
      "level": "user",
      "login": "eleanor-harbourfinch",
      "owner": {
        "id": 2041,
        "name": "Eleanor Finch",
        "type": "user"
      },
      "reach": {
        "clients": 0,
        "environments": 1,
        "websites": 1
      }
    }
  ],
  "add_refusals": [],
  "can_add": {
    "allowed": true,
    "refused": null
  },
  "connection": {
    "host": "ssh-northwind.example.net",
    "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
    },
    "port": 21044,
    "tunnel_target": "127.0.0.1:3306",
    "web_command": "ssh -p 21044 [email protected]",
    "your_login": {
      "command": "ssh -p 21044 [email protected]",
      "delivered": true,
      "login": "eleanor-harbourfinch",
      "state": "ready"
    }
  },
  "delivery": {
    "applied_at": "2026-11-05T09:17:02+00:00",
    "group_write": null,
    "last_error_public": null,
    "mode": "managed",
    "next_attempt_at": null,
    "not_on_new_system": false,
    "planned_for": null,
    "state": "applied",
    "verified_at": "2026-11-05T09:17:05+00:00",
    "waiting_for": null
  },
  "environment": {
    "company": {
      "id": 1204,
      "name": "Harbour & Finch"
    },
    "id": 1311,
    "name": "Production",
    "product": "corecluster",
    "site_id": 1042,
    "website": {
      "id": 1310,
      "name": "Harbour & Finch trade"
    }
  },
  "forwarding": {
    "restricted": false,
    "targets": []
  },
  "legacy": {
    "count": 1,
    "ends_on": "2026-12-09"
  },
  "logins": [
    {
      "keys": [
        {
          "added_at": "2026-11-03T10:02:44+00:00",
          "added_by": {
            "former": false,
            "name": "Eleanor Finch",
            "support": false
          },
          "bits": null,
          "delivery": {
            "planned_for": null,
            "state": "applied"
          },
          "editable": false,
          "fingerprint": "SHA256:o6poLLVqPDVYtxLTdagh8mUo96coeRXfX7Uxorxr158",
          "id": 7305,
          "last_used_at": "2026-11-04T16:20:11+00:00",
          "legacy": null,
          "name": "Office workstation",
          "removable": false,
          "restricted": false,
          "restrictions": [],
          "source": {
            "layer": "company",
            "owner": {
              "id": 1204,
              "name": "Harbour & Finch",
              "type": "company"
            }
          },
          "type": "ssh-ed25519",
          "weak": false
        },
        {
          "added_at": "2026-11-02T00:00:00+00:00",
          "added_by": null,
          "bits": null,
          "delivery": {
            "planned_for": null,
            "state": "applied"
          },
          "editable": false,
          "fingerprint": "SHA256:Ploa6Hz7DwoHuC3xPgwJD+qGdTytelbFQ+lXDSmu+lY",
          "id": 7290,
          "last_used_at": null,
          "legacy": {
            "ci_hint": null,
            "ends_on": "2026-12-09",
            "placed_at": null,
            "state": "legacy"
          },
          "name": "deploy@build-server",
          "removable": true,
          "restricted": false,
          "restrictions": [],
          "source": {
            "layer": "legacy",
            "owner": {
              "id": 1311,
              "name": "Production",
              "type": "environment"
            }
          },
          "type": "ssh-ed25519",
          "weak": false
        }
      ],
      "kind": "web",
      "login": "web",
      "person": null,
      "you": false
    },
    {
      "keys": [
        {
          "added_at": "2026-11-05T09:16:40+00:00",
          "added_by": {
            "former": false,
            "name": "Eleanor Finch",
            "support": false
          },
          "bits": null,
          "delivery": {
            "planned_for": null,
            "state": "applied"
          },
          "editable": true,
          "fingerprint": "SHA256:8LnkAlf64yNQsvTdVFxkoxM//vjpVpE8t+3gzVg1UjM",
          "id": 7306,
          "last_used_at": null,
          "legacy": null,
          "name": "Eleanor's laptop",
          "removable": true,
          "restricted": false,
          "restrictions": [],
          "source": {
            "layer": "user",
            "owner": {
              "id": 2041,
              "name": "Eleanor Finch",
              "type": "user"
            }
          },
          "type": "ssh-ed25519",
          "weak": false
        }
      ],
      "kind": "person",
      "login": "eleanor-harbourfinch",
      "person": {
        "former": false,
        "name": "Eleanor Finch",
        "user_id": 2041
      },
      "you": true
    }
  ],
  "managed_on": null,
  "notes": [
    "The browser terminal and AI tools connect through Corefinity, not through SSH keys or the firewall."
  ]
}
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