---
title: "update ssh key"
method: PUT
path: "/api/v0/ssh/{id}/"
tags: ["Accounts"]
---

# update ssh key

`PUT /api/v0/ssh/{id}/`

Updates the specified SSH key with the provided value.

CLI Usage: `vastai update ssh-key <id> <ssh_key>`

## Path parameters

- `id` integer, required

## Request body

- object
  - `ssh_key` string, required — The new value for the SSH key

## Response `200`

SSH key updated successfully

- object
  - `success` boolean
  - `key` object — The updated SSH key data

## Other responses

- `400` — Bad Request
- `429` — Too Many Requests

---

[API](https://skmtc.net/vast/apis/vast-ai-api.md) · [All operations](https://skmtc.net/vast/apis/vast-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vast/vast-ai-api/revisions/4ed14f79f796/schema)
