Skip to content

SSH keys

SSH keys are workspace-scoped. Once uploaded, a key can be injected into any new instance in that workspace at provision time. Uploading and deleting keys requires at least the WRITE permission on the INSTANCE resource kind. Reading keys requires at least READ.

Each workspace has a maximum number of SSH keys set by its quota.

Search workspace SSH keys

GET/v1/workspaces/{wid}/sshSearch workspace SSH keys

Lists SSH keys belonging to a workspace with pagination.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Query parameters

NameTypeDescription
qstringQuick search by name or ID
idinteger[]Filter to specific key IDs
namestringFilter by name

Plus the shared pagination parameters. Returns a paged list of SSH key objects.

bash
curl "https://api.galaxygate.net/v1/workspaces/42/ssh" \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -A 'curl/8.5'

Upload an SSH key

POST/v1/workspaces/{wid}/sshUpload an SSH key

Uploads an SSH public key to a workspace. The key is validated as a well-formed public key before it is stored. The name must be between 4 and 32 characters. Returns an error if the workspace has reached its SSH key quota.

Path parameters

NameTypeDescription
widintegerWorkspace ID

Request body

FieldTypeRequiredDescription
namestringyesDisplay name for the key, 4-32 characters
public_keystringyesFull public key string, for example ssh-ed25519 AAAA... user@host
bash
curl -X POST https://api.galaxygate.net/v1/workspaces/42/ssh \
  -H "Authorization: Bearer $GALAXYGATE_TOKEN" \
  -H "Content-Type: application/json" \
  -A 'curl/8.5' \
  -d '{
    "name": "laptop",
    "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPg0ih3sVYhcP7A4xlw6CTlc4D2Dzsy/DJDG2sw5dcbW user@host"
  }'

Returns the full SSH key object.

Fetch an SSH key

GET/v1/ssh/{id}Fetch an SSH key

Path parameters

NameTypeDescription
idintegerSSH key ID

Returns the full SSH key object.

Delete an SSH key

DELETE/v1/ssh/{id}Delete an SSH key

Deletes an SSH key. The key is removed from the workspace immediately. Instances that were already provisioned with this key are not affected; the key has already been written to their authorized_keys.

Path parameters

NameTypeDescription
idintegerSSH key ID

Returns 202 Accepted with an empty body.


SSH key object

FieldTypeDescription
idstringSSH key ID
namestringDisplay name
public_keystringThe full public key value
userobjectUser who uploaded the key (id and name)
ownerobjectWorkspace that owns the key (id and name)