DELETE SSH Service Accounts

The DELETE /SSHClosed The SSH (secure shell) protocol provides for secure connections between computers. It provides several options for authentication, including public key, and protects the communications with strong encryption./ServiceAccounts operation deletes one or more SSH service accounts in Keyfactor Command, including their SSH key pairs. On success, the operation returns 204 with no content.

Tip:  The following permissions (see Security Roles and Claims) are required to use this feature:
/ssh/server_admin/
OR
/ssh/enterprise_admin/

SSH actions are affected by ownership on the server group with which the key is associated and limited for users with only the Server Admin (/ssh/server_admin/) role. For more information, see SSH Permissions.

Table 916: DELETE SSH Service Accounts Input Parameters

Name In Description
ids Body Required. An array of integers indicating the Keyfactor Command reference IDs for the SSH service accounts to be deleted provided in the request body in the following format:
[4,12,17]

Use the GET SSH Service Accounts operation to retrieve a list of all the SSH service accounts to determine the service accounts IDs.

Tip:  Be sure to use the ID of the service account itself and not the ID of the service account user or service account's key within the service account. For example, notice the following record returned from a GET /SSH/ServiceAccounts request:
{
  "Id": 2,
  "ClientHostname": "appsrvr80.keyexample.com",
  "ServerGroup": {
    "Id": "603d3d4c-89dd-4ab8-92e1-8e83db3d5546",
    "GroupName": "Server Group Two",
    "UnderManagement": false
  },
  "User": {
    "Id": 7,
    "Key": {
      "Id": 36,
      "Fingerprint": "kwuo2k3Ej7wFVMLhI3g+rxt2qXwGp7qcvzdBjVTDHNg=",
      "PublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCAln+t [truncated for display]",
      "KeyType": "RSA",
      "KeyLength": 2048,
      "CreationDate": "2020-11-17T17:53:55.68",
      "Email": "pkiadmins@keyexample.com",
      "Comments": [
        "Access App Two"
      ],
      "LogonCount": 3
    },
    "Username": "svc_access2@appsrvr80.keyexample.com"
  }
}

It contains three IDs:

  • ID 2: The service account's ID. Use this one for delete requests.

  • ID 7: The service account user's ID.

  • ID 36: The ID of the service account user's key.