---
title: "Get instance SSH info"
method: GET
path: "/preview/v2/instances/{id}/ssh"
tags: ["Instances"]
---

# Get instance SSH info

`GET /preview/v2/instances/{id}/ssh`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Retrieve SSH connection details for an instance.

## Path parameters

- `id` string, required — A resource path like 'sfc:instance:acme:prod:my-instance' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

## Response `200`

SSH connection details.

- SfcApiInstanceSshInfo
  - `hostname` string, required
  - `port` integer, required
  - `host_keys` SfcApiInstanceSshHostKey[], required
    - `key_type` string, required — Key algorithm.
    - `key` string, byte, required — Base64-encoded public key.
  - `last_successful_key_update_at` integer — Unix timestamp.
  - `last_attempted_key_update_at` integer — Unix timestamp.

## Other responses

- `401` — Unauthorized.
- `404` — SSH details not available.
- `500` — Internal server error.

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/revisions/93dd7661e9bb/schema)
