---
title: "Ssh Key Login"
method: POST
path: "/auth/ssh-key"
---

# Ssh Key Login

`POST /auth/ssh-key`

## Request

- Base URL: `https://api.xhostd.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xhostd.com/auth/ssh-key`
- Auth: none declared

Mint a 30-day token for an ``api_login`` key.

The route finds the key row by the fingerprint of the presented
line, verifies the signature against the STORED blob, and mints
under the ``ssh-key-login`` label with the 20-token cap. An unknown
fingerprint and a key without ``api_login`` answer the same 404.

## Request body

- SshKeyLoginRequest
  - `public_key` string, required
  - `timestamp` integer, required
  - `signature` string, required

## Response `200`

Successful Response

- SshKeyLoginResponse
  - `token` string, required
  - `token_expires_at` string, date-time, required
  - `user_id` string, uuid, required
  - `username` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xhostd/apis/xhostd-public.md) · [All operations](https://skmtc.dev/xhostd/apis/xhostd-public/llms.txt) · [OpenAPI document](https://skmtc.dev/xhostd/apis/xhostd-public/revisions/bf439c4d1789?raw)
