Virtual Machines
Remove an SSH key from a server
Changed onRemove the key with this fingerprint from root's authorized_keys on a running Linux server, and from the server's settings so it does not come back at the next restart. Put the fingerprint in the path as ssh-keygen -l shows it, slashes included. Root's last key is removed only with confirm_last=true: a server created with only an SSH key has password sign-in turned off. Every change is emailed to the account owner and written to the audit log. Needs vm.ssh_keys; in the dashboard it also asks for a two-factor code.
delete/api/v1/vms/{id}/ssh-keys/{fingerprint}
Request
- Base URLhttps://api.rafftechnologies.com
- URLhttps://api.rafftechnologies.com/api/v1/vms/{id}/ssh-keys/{fingerprint}
- AuthAPI key in header X-API-Key
Path parameters
idstring uuid required
VM ID (UUID)
fingerprintstring required
Example:SHA256:KH7zm92O0/dbuPCSkvuS9zdDvBneuFaHt+qwZbp8OYU
The key's SHA256 fingerprint
Query parameters
confirm_lastboolean
Remove the key even when it is root's last key
Response
The server's keys after the remove
Example response
{
"data": {
"keys": [
{
"fingerprint": "SHA256:KH7zm92O0/dbuPCSkvuS9zdDvBneuFaHt+qwZbp8OYU",
"type": "ssh-ed25519",
"comment": "you@laptop"
}
]
}
}Changes
- info
endpoint added
- info