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.
Path parameters
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
The levels you may add a key at.
Fields of each item
environmentwebsitecompanyuserThe username a key added at this level logs in with.
Where a key is held: a company, a website, an environment or a person.
Fields
The id of the company, website, environment or user.
companywebsiteenvironmentuserHow far a key reaches.
Fields
Client companies an agency's key reaches.
Levels left out of add_options because your role may not add there.
Fields of each item
companyforbiddenWhether you may add a key here.
Fields
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_elsewherenullHow to connect to the environment over SSH.
Fields
The host keys an SSH client checks when it connects.
Fields
Format: date-time.
Fields of each item
ed25519ecdsarsaComplete known_hosts lines for this environment. Public keys only.
panel host keys can be rotated here. corefinity host keys (CoreStack Enterprise) are read-only.
panelcorefinityThe host keys a staged rotation will switch to. Null when no rotation is staged.
Fields of each item
ed25519ecdsarsaThe host:port a database tunnel forwards to. Null when there is none.
The ssh command for the shared web user.
Your own username on this environment.
Fields
The ssh command to connect with it.
True once the username works on the environment.
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_loginWhether the environment's keys are managed by the Control Panel, and whether the latest change is live.
Fields
Format: date-time.
CoreStack Enterprise only; null elsewhere.
offrollingverifiednullWhy the last change failed, in plain words.
managed once the Control Panel manages the environment's keys.
legacymanagedWhen a failed change is tried again. Format: date-time.
True when the Control Panel does not manage this environment's keys and no switch-over is planned.
When the environment is planned to switch over. Format: date-time.
pendingapplyingappliedfaileddriftwaitingunmanagedFormat: date-time.
What a waiting environment waits for.
adoptionplatform_updatepersons_gatecli_overridenullAn environment, with the website and company it belongs to.
Fields
Fields
At least 1.
The environment id, the {environment} these endpoints take and the owner.id of an environment key.
cse is CoreStack Enterprise.
csecorestackcoreclusterThe site row id the /corestack/sites/{site} endpoints take. Null on CoreStack Enterprise.
Fields
At least 1.
Where SSH port forwarding may connect to.
Fields
The Legacy keys on the environment.
Fields
The day they stop working. Format: date.
Each username with its keys.
Fields of each item
Fields of each item
Format: date-time.
The key size, for RSA keys.
Whether the key works on this environment yet.
Fields
When a waiting environment is planned to switch over. Format: date-time.
waiting means the environment has not switched to keys managed by the Control Panel yet.
appliedapplyingremovingfailedwaitingWhether you may rename the key or change where it applies.
The SHA-256 fingerprint, as ssh-keygen -lf prints it.
The key id the /ssh/keys/{key} endpoints take. Null for the Corefinity deploy key.
Format: date-time.
Set for a Legacy key, else null.
Whether you may remove the key.
True when the key carries restrictions from before it was imported.
The restrictions as they are written in front of the key. Read-only.
The level a key on an environment comes from.
Fields
agency is a key of your agency. system is the Corefinity deploy key.
agencycompanywebsiteenvironmentuserlegacysystemNull for a key that has no owner you can see.
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]True for a key that would be refused if it were added today.
web is the site's shared user. person is one person's own username.
webpersonThe username.
The person, for a person username.
True for your own username.
Set when this environment shares a server with another one that manages its keys. Keys are then changed on that environment.
Sentences about the environment's state, in plain words.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | scope_required | Use a token with the scope named in scope. |
404 | feature_off | This feature is not on for your organisation yet. |
404 | not_found | Not found. |
429 | rate_limited | Wait 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"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/environments/1311/ssh');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/environments/1311/ssh', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/environments/1311/ssh",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"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."
]
}{
"message": "Unauthenticated."
}{
"code": "scope_required",
"message": "This access token does not have the destructive scope this needs. Use a token with the destructive scope.",
"reason": "scope_required",
"scope": "destructive"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}