SSH keys and access
Find a CoreStack Enterprise environment's SSH command and add the public keys that may log in.
On this page
Before you start
- You can open the environment: see Websites and environments.
- You have a public key of an accepted type: see SSH keys.
- Your IP address is on the environment's firewall: see Enterprise firewall.
Find the SSH command
Open SSH access
Open the environment and choose SSH access. The Connection card has the Host, the Port and the SSH command for the shared username
web.
Add a key
Open the key list
On SSH access, the list shows every key that reaches this environment, grouped by username. Choose Add key.
Paste the key
Paste the contents of your
.pubfile into Public key and enter a Name.Choose who will log in with it
Under Who will log in with it, choose This environment, This website, My company or Me, then choose Add key.
The key reads Applying, then Applied. What each choice covers, and editing and removing a key, are as on a site: see SSH keys.
See a website's keys
Open the website's SSH keys
Open the website's page and choose SSH keys. The list holds the keys that work on every environment of the website.
Keep or remove an older key
Decide on the key
A key that was on the environment before keys were managed here is marked Legacy. Choose Keep to carry on using it, or Remove.
Automate this
Adds a public key at one level: a company or a website (for all or for selected environments), one environment, or yourself.
curl -X POST https://manage.corefinity.com/api/ssh/keys \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"applies_to": {
"environment_ids": [
1311
],
"mode": "selected"
},
"name": "Build server",
"owner": {
"id": 1204,
"type": "company"
},
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAAAExampleKeyOnlyDoNotUseThisIsNotARealKey2"
}'Your assistant calls corestack_ssh_key_add.
{
"name": "corestack_ssh_key_add",
"arguments": {
"owner": {
"type": "company",
"id": 4211
},
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ci@example",
"name": "Bitbucket Pipelines"
}
}