GET /compute/ssh-keys
List SSH keys
List the SSH public keys of this project. Use when choosing which keys can log in to a new machine. Before: nothing. Returns data (key_ id, name, type, fingerprint). Scope: compute:read.
API key (Bearer), on the public API endpoint.
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X GET "$GALON_API_BASE/compute/ssh-keys" \
-H "Authorization: Bearer $GALON_API_KEY"POST /compute/ssh-keys
Add an SSH key
Register an SSH PUBLIC key (never a private key). Use when the user wants to log in to machines with a key not yet listed. Before: list_ssh_keys (needs compute read access); never send the private key. Returns the key with its key_ id and SHA256 fingerprint. Scope: compute:write.
API key (Bearer), on the public API endpoint.
Request body
application/json
| Field | Type | Description |
|---|---|---|
public_key | string · required | One line of a .pub file: type, key and an optional comment. |
name | string | Label shown in the console. |
Responses
| Status | Description | Body |
|---|---|---|
2XX | Success: the JSON body the route returns (see the description for its fields). | object |
401 | Key missing or invalid | Error |
4XX | Refused: act on detail.code, then follow detail.next_action (404 not_found while the service is not open to the account). | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/compute/ssh-keys" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"public_key": "string"}'