CorefinityCorefinityDocs
Open the Control PanelControl Panel
SSH access · 12 of 22

corestack_ssh_keys_list

List SSH keys.

Scope readNo secrets returned
On this page

When to use it

List who can log in over SSH, and with which keys, on one environment, a website or a company. Each key shows where it comes from (environment, website, company, agency, personal, Legacy), who added it, its fingerprint, type and size, when it was last used and whether it has reached the environment. Never a key itself.

A website's or a company's own keys (grants[], and a company's inherited[]) carry delivery across every environment they reach: state, applied of total (where the key works now), waiting (environments where the key, or its removal, takes effect only at their one-time switch-over or a platform update; until then the keys that worked there before keep working), waiting_platform_update (how many of waiting wait for a platform update), removed (a key being removed: the environments it has already gone from; 0 otherwise) and not_on_new_system (environments that are not on the new system yet, so keys there are not changed from here yet). An agency's key in a client's inherited[] describes the client's own environments only: its delivery, reach, applies_to.environment_ids and last_used_at. Say "works on 16 of 26 environments, the other 10 at their switch-over", never that a waiting or removing key is broken.

total counts only the environments on the new system or joining it: environments that are not on the new system yet are counted in not_on_new_system and left out of total, applied, waiting and removed. A key on 16 environments with 10 more not on the new system yet reads state applied, applied 16 of total 16, not_on_new_system 10: say "works on all 16 environments on the new system; 10 are not on the new system yet". When every environment is outside, total is 0 and state is applied. An environment's own delivery.not_on_new_system is true when it is not on the new system yet, whatever its state and waiting_for say (waiting_for is cli_override when its CLI override keeps it off); it then has no switch-over date, so never promise one.

An environment's answer has managed_on: null, or {id, name} when this environment runs on the same server as another environment whose SSH the Control Panel manages. Its keys are then added, changed and removed on that environment (the first note says so, and can_add.refused is managed_elsewhere).

A company's answer (my_company or client_company_id) also has can_add.message: when your role lacks the Create Company SSH Keys permission, can_add.refused is forbidden and message is the sentence adding a company key would refuse with (the permission and who can grant it); otherwise it is null.

An environment's answer lists in add_options the levels you may add a key at (this environment, its website, the company, yourself). A level you reach but your role may not add at is left out of it and named in add_refusals instead, {level, refused, message}: today only company, forbidden, when your role lacks the Create Company SSH Keys permission, with the same sentence. Offer only the levels in add_options; when the person asks for the company level, give them that sentence. add_refusals is empty for the company's owner and for a role holding the permission.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_ssh_keys_list with site_id 912. (List SSH keys.) Tell me what it returned.

Inputs

client_company_idinteger

A client company your agency reaches. At least 1.

enterprise_env_idinteger

A CoreStack Enterprise environment's id (environment.id in corestack_ssh_keys_list). Give this or site_id. At least 1.

my_companyboolean

true for your own company.

site_idinteger

A CoreStack or CoreCluster environment row, as the other corestack tools take it. Give this or enterprise_env_id. At least 1.

website_idinteger

A website's id. Give exactly one of the four selectors. At least 1.

Example call

tools/call
{
  "name": "corestack_ssh_keys_list",
  "arguments": {
    "site_id": 912
  }
}

If it is refused

ReasonWhat to do
forbiddenListing a company's keys and the person's role lacks the View Company SSH Keys permission. The message names it and says an owner of the company can grant it in Roles; details.permission is viewCompanySSHKeys.
switched_offSSH keys are not switched on for this object yet.
enterprise_panel_onlySSH keys for CoreStack Enterprise environments are managed in the Control Panel only at the moment.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT