---
title: Update SSH Keys
url: https://docs.vultr.com/products/orchestration/ssh-keys/update-ssh-keys
description: A guide explaining how to modify or replace existing SSH keys in your Vultr account for secure server access
publish_date: 2024-11-15T18:19:46.201202Z
last_updated: 2026-05-26T20:19:00.341071Z
---

# How to Update Vultr SSH Keys

Updating a Secure Shell (SSH) key means replacing the public key from your Vultr account. Before updating the key, ensure you have a fresh SSH key pair. Then, keep the private key on your local device and copy the public key to your clipboard.

Follow this guide to update SSH keys using the Vultr Console, API, or CLI.

=== "Vultr Console"

    1. Navigate to **Account** and select **SSH Keys** under **OTHER**.
    1. Select the SSH key from the list and click the **Edit SSH Key** icon.

        ![Add SSH Key](https://docs.vultr.com/public/doc-assets/collection-items/913/fa676c62-d993-49d4-b245-a6270413f6c5.png)

    1. Enter the SSH Key details and click **Update SSH Key**.

        ![SSH Key Details](https://docs.vultr.com/public/doc-assets/collection-items/913/28e98919-62aa-403d-8a5c-6418c7ec9c18.png)
    
=== "Vultr API"

    1. Send a `GET` request to the [**List SSH Keys** endpoint](https://www.vultr.com/api/#tag/ssh/operation/list-ssh-keys) to view all SSH keys and note the target SSH key's ID.

        ```console
        $ curl "https://api.vultr.com/v2/ssh-keys" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `PATCH` request to the [**Update SSH Key** endpoint](https://www.vultr.com/api/#tag/ssh/operation/update-ssh-key) to update the target SSH key.

        ```console
        $ curl "https://api.vultr.com/v2/ssh-keys/{ssh-key-id}" \
            -X PATCH \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "name" : "{updated_ssh_key_name}",
                "ssh_key" : "{updated_ssh_public_key_value} {email_address}"
            }'    
        ```

        Visit the [**Update SSH Key** endpoint](https://www.vultr.com/api/#tag/ssh/operation/update-ssh-key) to view additional attributes to add to your request.

=== "Vultr CLI"

    1. List all SSH keys and note the target SSH key's ID.

        ```console
        $ vultr-cli ssh-keys list
        ```

    1. Update the target SSH Key by specifying the ID.

        ```console
        $ vultr-cli ssh-keys update <ssh-key-id> \
        --name="<updated_ssh_key_name>" \
        --key="<updated_ssh_public_key_value> <email_address>"
        ```
    
        Run `vultr-cli ssh-keys update --help` to view additional available options.