---
title: "List the SSH public keys attached to a rental"
method: GET
path: "/v2/ssh-keys/rental"
tags: ["ssh-keys"]
---

# List the SSH public keys attached to a rental

`GET /v2/ssh-keys/rental`

List the SSH public keys attached to a rental. Reports RENTAL_NOT_FOUND for rentals that don't exist or the user doesn't control.

## Query parameters

- `rentalId` integer, required

## Response `200`

Successful response

- object[]
  - `id` integer, required
  - `publicKey` string, required
  - `name` string, nullable, required
  - `createdAt` string, required

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `404` — Not found
- `500` — Internal server error

## Changes

- **2026-09-26** `6b22302ea98a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hyperbolic/apis/castle-api/changes/v2/ssh-keys/rental/get.md)

---

[API](https://skmtc.dev/hyperbolic/apis/castle-api.md) · [All operations](https://skmtc.dev/hyperbolic/apis/castle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hyperbolic/apis/castle-api/revisions/6b22302ea98a?raw)
