Remove virtual machine SSH keys
Remove one or more SSH public keys from a specified virtual machine.
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
virtualMachineIdintegerRequiredExample:
Virtual Machine ID
1268054Body
keysstring[]RequiredExample:
SSH public keys in OpenSSH format to remove
["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.com"]Responses
200
Success response
application/json
Array of VPS.V1.SshKey.SshKeyResource
keystringOptionalExample:
SSH public key in OpenSSH format
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g... user@example.comtypestringOptionalExample:
SSH key type
ssh-rsadatastringOptionalExample:
SSH key data (base64 encoded public key)
AAAAB3NzaC1yc2EAAAADAQABAAABAQC0g...namestringOptionalExample:
SSH key comment/name
user@example.com401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
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?