Skip to main content
SSH key methods manage the public keys associated with your Phala Cloud account. These keys are injected into CVMs at boot time, giving you SSH access to your running instances.

list_ssh_keys

GET /user/ssh-keys Lists all SSH keys registered to your account. Parameters: None. Returns: List of SSH key objects. Example:

create_ssh_key

POST /user/ssh-keys Adds a new SSH public key to your account. Parameters: Returns: The created SSH key object. Example:

delete_ssh_key

DELETE /user/ssh-keys/{keyId} Removes an SSH key from your account. Existing CVMs that were provisioned with this key will retain it until they are restarted. Parameters: Returns: None Example:

import_github_profile_ssh_keys

POST /user/ssh-keys/github-profile Imports SSH public keys from a GitHub user profile. This fetches the keys listed at https://github.com/{username}.keys and adds them to your account. Parameters: Returns: Import response with the number of keys imported. Example:

sync_github_ssh_keys

POST /user/ssh-keys/github-sync Syncs SSH keys from your connected GitHub account. This requires that your Phala Cloud account is linked to GitHub via OAuth. Unlike import_github_profile_ssh_keys, this uses your authenticated GitHub connection and keeps keys in sync. Parameters: None. Returns: Sync response with details of added/removed keys. Example: