---
title: "Update SSH key"
method: PUT
path: "/v1/ssh-keys/{key-id}"
tags: ["SSH Keys"]
---

# Update SSH key

`PUT /v1/ssh-keys/{key-id}`

Update an existing SSH key's name and optionally its key data.

## Path parameters

- `key-id` integer, required

## Request body

- SshKeyUpdate
  - `name` string, required — SSH key name
  - `publicKey` string — New public key
  - `privateKey` string — New private key

## Response `200`

SSH key updated successfully

- SshKey
  - `id` integer — SSH key ID
  - `name` string — SSH key name
  - `publicKey` string — Public key in OpenSSH format (included in details and when includePublicKey=true)

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — User does not have SSH key configuration access rights
- `404` — SSH key not found

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/14d93e5115dd/schema)
