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 method is used to delete one or more SSH service accounts in Keyfactor Command, including their SSH key pairs. This endpointClosed An endpoint is a URL that enables the API to gain access to resources on a server. returns 204 with no content upon success.

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 802: 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/ServiceAccounts method (see GET SSH Service Accounts) 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:
{
  "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.

Tip:  See the Keyfactor API Reference and Utility which provides a utility through which the Keyfactor APIClosed An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. endpoints can be called and results returned. It is intended to be used primarily for validation, testing and workflowClosed A workflow is a series of steps necessary to complete a process. In Keyfactor Command, it refers to the workflow builder, which allows you to automate event-driven tasks such as when a certificate is requested, revoked or found in a certificate store. development. It also serves secondarily as documentation for the API. The link to the Keyfactor API Reference and Utility is in the dropdown from the help icon () at the top of the Management Portal page next to the Log Out button.