---
title: "Deploy SSH key to a host"
method: POST
path: "/credentials/{id}/deploy-to-host"
tags: ["Credentials"]
---

# Deploy SSH key to a host

`POST /credentials/{id}/deploy-to-host`

Deploys an SSH public key to a target host's authorized_keys file.

## Path parameters

- `id` integer, required

## Request body

- object
  - `targetHostId` integer

## Response `200`

SSH key deployed successfully.

## Other responses

- `400` — Credential ID and target host ID are required.
- `401` — Authentication required.
- `404` — Credential or target host not found.
- `500` — Failed to deploy SSH key.

---

[API](https://skmtc.dev/termix/apis/termix-api.md) · [All operations](https://skmtc.dev/termix/apis/termix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/termix/termix-api/revisions/f4ef343eff1b/schema)
