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

# Update SSH keys

`PUT /v1/ssh-keys/{sshKeyId}`

## Request

- Base URL: `https://api.emma.ms/external`
- URL: `https://api.emma.ms/external/v1/ssh-keys/{sshKeyId}`
- Auth: HTTP bearer

This method updates a name of an existing SSH-key. You can only update an SSH key created by the current Service application that you use to send a request. You can't update SSH keys created by other users and applications.

## Path parameters

- `sshKeyId` integer, required

## Request body

- SshKeyUpdate
  - `name` string, required: SSH key name

## Response `200`

Successful operation

- SshKey
  - `id` integer: SSH key ID
  - `name` string: SSH key name
  - `key` string: SSH public key
  - `fingerprint` string: SSH key fingerprint
  - `keyType` string: SSH key type (RSA or ED25519)
  - `createdAt` string: Date and time when the SSH key was created
  - `createdByName` string: Name of the user who created the SSH key
  - `createdById` integer: ID of the user who created the SSH key

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/emma/apis/public-emma-api.md) - [All operations](https://skmtc.dev/emma/apis/public-emma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/emma/apis/public-emma-api/revisions/9e55f0920078?raw)
