---
title: Reinstall SSH Keys
url: https://docs.vultr.com/products/compute/instances/optimized-cloud-compute/management/reinstall-ssh-keys
description: A guide for reinstalling SSH keys on your Vultr Optimized Cloud Compute instance to restore secure access.
publish_date: 2024-09-23T20:19:37.524922Z
last_updated: 2026-05-26T18:45:15.432692Z
---

# How to Reinstall SSH Keys on a Vultr Optimized Cloud Compute Instance

SSH keys enable secure, password-free authentication for users accessing your instance over SSH. Reinstalling SSH keys resets the instance, wiping all data and reinstalls the operating system to apply the new SSH key details.

Follow this guide to reinstall SSH keys on a Vultr Optimized Cloud Compute instance using the Vultr Console, or Terraform.

> [!WARNING]
> Reinstalling SSH keys will wipe all data on the instance and reapply the selected SSH keys.

=== "Vultr Console"

    1. Navigate to **Products** and click **Compute**.
    1. Click your target Vultr Optimized Cloud Compute instance to open its management page.
    1. Navigate to the **Settings** tab.
    1. Find and click **Reinstall SSH Keys** on the left navigation menu.
    1. Select the target SSH key and click **Reinstall**.
    1. Check the confirmation prompt and click **Reinstall SSH Keys** to apply the changes, reinstall the instance and enable the SSH key.

=== "Terraform"

    1. Open your Terraform configuration for the existing Optimized Cloud Compute instance.

    1. Update the `ssh_key_ids` in the instance resource to reference the new SSH key(s).

        ```terraform
        resource "vultr_ssh_key" "new_key" {
            name       = "mbp-ed25519"
            public_key = file("~/.ssh/id_ed25519.pub")
        }

        resource "vultr_instance" "occ" {
            # ...existing fields (region, plan, os_id, label, etc.)

            ssh_key_ids = [vultr_ssh_key.new_key.id]
        }
        ```

    1. Apply the configuration and observe the following output:

        ```
        Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
        ```
