How to Delete Vultr SSH Keys

Updated on November 15, 2024

Deleting a Secure Shell (SSH) key removes the public key from your Vultr account. After deleting the key, you can no longer log in to your account using the corresponding private key. This action is necessary if you've inactive or compromised keys.

Follow this guide to delete SSH keys using the Vultr Customer Portal, API, and CLI.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Account and select SSH Keys under OTHER.

  2. Select the SSH key from the list and click the Delete Icon.

    Add SSH Key

  1. Send a GET request to the List SSH Keys endpoint and note the SSH key ID.

    console
    $ curl "https://api.vultr.com/v2/ssh-keys" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a DELETE request to the Delete SSH Key endpoint and specify the ID to delete the SSH key.

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

    Visit the Delete SSH Key endpoint to view additional attributes to add to your request.

  1. List all SSH keys and note the SSH key ID.

    console
    $ vultr-cli ssh-keys list
    
  2. Delete the SSH Key by specifying the ID.

    console
    $ vultr-cli ssh-keys delete ssh-key-id
    

    Run vultr-cli ssh-keys delete --help to view all options.