Skip to main content
SSH key methods manage the public keys authorized for SSH access to your CVMs. You can add keys manually, import them from a GitHub profile, or sync them from your linked GitHub account.

ListSSHKeys

GET /user/ssh-keys Returns all SSH keys registered for the current user.
Returns: []SSHKey where each SSHKey contains:

CreateSSHKey

POST /user/ssh-keys Registers a new SSH public key.
CreateSSHKeyRequest fields: Returns: *SSHKey — the created key with its assigned ID and fingerprint.

DeleteSSHKey

DELETE /user/ssh-keys/{keyId} Removes an SSH key by its ID. Existing CVMs that were deployed with this key will retain access until they are restarted or updated.
Parameters: Returns: error (no response body on success)

ImportGithubProfileSSHKeys

POST /user/ssh-keys/github-profile Imports SSH public keys from any GitHub user’s profile. This fetches the keys from https://github.com/{username}.keys and adds them to your account.
Parameters: Returns: *ImportGithubResponse (generic map with import details)
This imports keys from any public GitHub profile. Use SyncGithubSSHKeys instead if you want to sync keys from your own linked GitHub account.

SyncGithubSSHKeys

POST /user/ssh-keys/github-sync Syncs SSH keys from the user’s linked GitHub account. This requires that the user has connected their GitHub account to Phala Cloud.
Returns: *SyncGithubResponse (generic map with sync details)