HomeDocumentationAPI Reference
Log In
API Reference

Remove or deduplicate an SSH key for a specific user on a specific host

Performs an SSH key response action for a specific user on a specific host. Requires the responder role. For 'remove' actions, a last-key protection safety check denies the request with HTTP 409 if the host would be left with zero SSH keys known to Sandfly after removing the key for this user; set allow_last_key_removal=true in the request body to override.

Path Params
int32
required

SSH public key ID (integer) from SSH Hunter.

string
enum
required

Action to perform: 'sshkey_remove' or 'sshkey_dedup'.

Allowed:
int32
required

Host sequence ID to target.

string
required

Username on the target host.

Body Params

Optional JSON body for an SSH key response action request. An empty body is equivalent to setting the allow_last_key_removal property to false.

boolean

When true, override the last-key protection safety check. Without this flag set, a 'sshkey_remove' action that would leave any affected host with zero SSH keys known to Sandfly is denied with HTTP 409. Has no effect for the 'sshkey_dedup' action.

Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json