---
title: "List CVM SSH keys"
method: GET
path: "/api/v1/cvms/{cvm_id}/ssh-keys"
tags: ["CVMs"]
---

# List CVM SSH keys

`GET /api/v1/cvms/{cvm_id}/ssh-keys`

## Request

- Base URL: `https://cloud-api.phala.com`
- URL: `https://cloud-api.phala.com/api/v1/cvms/{cvm_id}/ssh-keys`
- Auth: none declared
- TypeScript: <https://skmtc.dev/phala/apis/phala-cloud-api/docs/api/v1/cvms/:cvm_id/ssh-keys/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the SSH keys this CVM is configured to authorize, and whether a restart is needed for the running VM to match.

## Path parameters

- `cvm_id` string, required

## Response `200`

Authorized keys

- CvmSshKeysResponse: The keys a CVM is configured to authorize. This is the desired set. It reaches the guest at the next power-on; read ``GET /cvms/{cvm_id}/user_config`` for what the running VM actually has.
  - `keys` CvmSshKeyEntry[]
    - `id` string, hashid, required: SSH key hashid
    - `owner_user_id` string, hashid, required: User who owns the key
    - `owner_username` string, required: Username of the key owner
    - `added_by_user_id` string, hashid, required: User who authorized it on this CVM
    - `name` string, required: Human-readable key name
    - `public_key` string, required: OpenSSH format public key
    - `fingerprint` string, required: SHA256 fingerprint
    - `key_type` string, required: Algorithm (ssh-ed25519, ssh-rsa, ...)
  - `restart_required` boolean, required: True when the stored set has not been applied to the running VM yet

## Other responses

- `401`: Not authenticated
- `404`: CVM not found or not accessible in this workspace
- `422`: Validation Error

## Changes

- **2026-11-07** `c71a8dc90391`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/phala/apis/phala-cloud-api/changes/api/v1/cvms/:cvm_id/ssh-keys/get.md)

---

[API](https://skmtc.dev/phala/apis/phala-cloud-api.md) - [All operations](https://skmtc.dev/phala/apis/phala-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phala/apis/phala-cloud-api/revisions/c71a8dc90391?raw)
