> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List SSH Keys on a VM

> The keys in root's `authorized_keys` on a running Linux server, read from the server itself through its QEMU guest agent (a few seconds). Each key is named after your saved key with the same fingerprint; a key someone added on the server itself has no saved key. SSH keys are managed on Linux servers only. Needs `vm.view`.

<sub>Updated October 21, 2026</sub>


## OpenAPI

````yaml GET /api/v1/vms/{id}/ssh-keys
openapi: 3.0.3
info:
  title: Raff API
  description: >
    REST API for managing cloud infrastructure on Raff.


    ## Authentication

    Most endpoints require authentication via API key. Catalog endpoints under
    `/api/v1/public/` are open and require no authentication.


    ### API Key Authentication

    Include your API key in the `X-API-Key` header:
      ```
      curl -H "X-API-Key: YOUR_API_KEY" https://api.rafftechnologies.com/api/v1/vms
      ```

    ## Catalog

    Use the public catalog endpoints to discover available regions, OS
    templates, and pricing plans before creating resources:

    - `GET /api/v1/public/regions` — list available regions

    - `GET /api/v1/public/templates` — list OS templates (use the `id` as
    `template_id` when creating a VM)

    - `GET /api/v1/public/pricing/vm` — list VM pricing plans (use the `id` as
    `pricing_id` when creating a VM)

    - `GET /api/v1/public/pricing/volume` — volume storage pricing

    - `GET /api/v1/public/pricing/snapshot` — snapshot storage pricing

    - `GET /api/v1/public/pricing/backup` — backup storage pricing

    - `GET /api/v1/public/pricing/ip` — IP address pricing

    - `GET /api/v1/public/pricing/database` — managed database pricing (plans,
    high availability, read replicas, extra storage)

    - `GET /api/v1/public/pricing/kubernetes` — managed Kubernetes pricing
    (worker node plans, HA control plane, storage nodes)
  version: 1.0.0
  contact:
    name: Raff Technologies
    url: https://rafftechnologies.com
servers:
  - url: https://api.rafftechnologies.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Catalog
    description: >-
      Discover available regions, OS templates, and pricing plans. No
      authentication required.
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Organize resources into projects for billing and access control
  - name: Virtual Machines
  - name: Kubernetes
    description: >-
      Managed Kubernetes clusters — HA control planes, autoscaling node pools,
      kubeconfig access
  - name: Functions
    description: Deploy and manage serverless functions
  - name: Raff Apps
    description: >-
      Push-to-deploy web services, private services, workers, cron jobs, and
      one-off jobs on the Raff PaaS — with custom domains, environment
      variables, autoscaling, and per-second billing with spend caps
  - name: Managed Databases
    description: >-
      Managed PostgreSQL, MySQL, Valkey, ClickHouse and Kafka with backups, high
      availability, private VPC networking, optional public access over TLS, and
      metrics
  - name: Networking
    description: >-
      Attach and detach VPCs, floating IPs, and security groups to VM network
      interfaces
  - name: Snapshots
    description: Point-in-time copies of VMs and volumes for quick rollback or cloning
  - name: Backups
    description: Scheduled and on-demand VM backups with restore capability
  - name: Backup Schedules
    description: Recurring daily or weekly backup schedules attached to a VM
  - name: SSH Keys
    description: Manage account-level SSH keys for VM provisioning
  - name: Members
    description: Account-level members — invite, list, update role, remove
  - name: Project Members
    description: Members of a specific project — same model as Members but project-scoped
  - name: Roles
    description: Custom roles bundling account or project permissions
  - name: Permissions
    description: List the catalog of permission strings used by roles
  - name: API Keys
    description: Create and manage API keys for programmatic access
  - name: Invitations
    description: Create and cancel email-based invitations to join the account or a project
paths:
  /api/v1/vms/{id}/ssh-keys:
    get:
      tags:
        - Virtual Machines
      summary: List SSH keys on a server
      description: >-
        The keys in root's `authorized_keys` on a running Linux server, read
        from the server itself through its QEMU guest agent (a few seconds).
        Each key is named after your saved key with the same fingerprint; a key
        someone added on the server itself has no saved key. SSH keys are
        managed on Linux servers only. Needs `vm.view`.
      operationId: listServerSSHKeys
      parameters:
        - $ref: '#/components/parameters/VMIDPath'
      responses:
        '200':
          description: The server's keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerSSHKeysResponse'
        '400':
          $ref: '#/components/responses/ServerSSHKeysRefused'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/ServerSSHKeysRefused'
        '503':
          $ref: '#/components/responses/ServerSSHKeysRefused'
        '504':
          $ref: '#/components/responses/ServerSSHKeysRefused'
components:
  parameters:
    VMIDPath:
      name: id
      in: path
      required: true
      description: VM ID (UUID)
      schema:
        type: string
        format: uuid
  schemas:
    ServerSSHKeysResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ServerSSHKeys'
    ServerSSHKeys:
      type: object
      description: A server's keys after a read, add or remove
      properties:
        keys:
          type: array
          items:
            $ref: '#/components/schemas/ServerSSHKey'
        read_at:
          type: string
          format: date-time
        changed:
          type: integer
          description: >-
            Lines added or removed (0 when the key was already there, or not
            there)
        saved_key_id:
          type: string
          description: The saved key `save_as` created
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    ServerSSHKey:
      type: object
      description: One key line of root's `authorized_keys` on a server
      properties:
        fingerprint:
          type: string
          example: SHA256:KH7zm92O0/dbuPCSkvuS9zdDvBneuFaHt+qwZbp8OYU
        type:
          type: string
          example: ssh-ed25519
        comment:
          type: string
          example: you@laptop
        has_options:
          type: boolean
          description: >-
            The line starts with `authorized_keys` options (`command="..."`,
            `from="..."`)
        saved_key_id:
          type: string
          description: Your saved key with this fingerprint; empty when it is not saved
        saved_key_name:
          type: string
        public_key:
          type: string
          description: The key without its options, as a `.pub` file holds it
  responses:
    ServerSSHKeysRefused:
      description: >-
        The server's keys could not be read or changed. `reason` says why:
        `not_linux`, `invalid_key` (400); `not_on_server` (404); `not_running`,
        `no_guest_agent`, `agent_blocked`, `selinux_blocked`, `last_key`,
        `refused` (409); `host_unavailable`, `context_failed` (503); `no_answer`
        (504). `error` is the sentence to show.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                example: >-
                  The QEMU guest agent is not running on web-01. Install and
                  start qemu-guest-agent in the server, then try again.
              reason:
                type: string
                enum:
                  - not_linux
                  - invalid_key
                  - not_on_server
                  - not_running
                  - no_guest_agent
                  - agent_blocked
                  - selinux_blocked
                  - last_key
                  - refused
                  - host_unavailable
                  - context_failed
                  - no_answer
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Each key is bound to a specific account.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.