For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remove virtual machine SSH keys

Remove one or more SSH public keys from a specified virtual machine.

Remove virtual machine SSH keys

delete

Remove one or more SSH public keys from a specified virtual machine.

Removed keys can no longer be used to authenticate via SSH as the root user. Returns the remaining list of SSH keys configured on the virtual machine.

Use this endpoint to revoke SSH key access to VPS instances.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
virtualMachineIdintegerRequired

Virtual Machine ID

Example: 1268054
Body
keysstring[]Required

SSH public keys in OpenSSH format to remove

Example: ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.com"]
Responses
200

Success response

application/json
keystringOptional

SSH public key in OpenSSH format

Example: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.com
typestringOptional

SSH key type

Example: ssh-rsa
datastringOptional

SSH key data (base64 encoded public key)

Example: AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g...
namestringOptional

SSH key comment/name

Example: user@example.com
delete/api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys
DELETE /api/vps/v1/virtual-machines/{virtualMachineId}/ssh-keys HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "keys": [
    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.com"
  ]
}
[
  {
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.com",
    "type": "ssh-rsa",
    "data": "AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g...",
    "name": "user@example.com"
  }
]

Last updated

Was this helpful?