GET SSH Service Accounts

The GET /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 retrieve one or more SSH service accounts defined in Keyfactor Command. Results can be limited to selected service accounts using filtering, and URL parameters can be used to specify paging and the level of information detail. This method returns HTTP 200 OK on a success with details for the requested SSH service accounts and their public keys. To return the SSH private keyClosed Private keys are used in cryptography (symmetric and asymmetric) to encrypt or sign content. In asymmetric cryptography, they are used together in a key pair with a public key. The private or secret key is retained by the key's creator, making it highly secure., use the GET /SSH/ServiceAccounts/Key/{id} method (see GET SSH Service Accounts Key ID).

Tip:  The following permissions (see Security Overview) are required to use this feature:

SSH: ServerAdmin OR
SSH: EnterpriseAdmin

SSH actions are affected by ownership on the server group with which the key is associated and limited for users with only the ServerAdmin role. For more information, see SSH Permissions in the Keyfactor Command Reference Guide.

Table 547: GET SSH Service Accounts Input Parameters

Name In Description
queryString Query

A string containing a query to limit the results (e.g. field1 -eq value1 AND field2 -gt value2). The default is to return all records. Fields available for querying through the APIClosed 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. for the most part match those that appear in the Keyfactor Command Management Portal search dropdowns for the same feature. For querying guidelines, refer to the Keyfactor Command Reference GuideUsing the Service Account Key Search. The query fields supported for this endpointClosed An endpoint is a URL that enables the API to gain access to resources on a server. are:

  • CreationDate

  • Id

  • Comments (Key comments)

  • KeyLength

  • KeyType

  • ServerGroup (Server Group ID)

  • ServerGroupName

  • Username

pageReturned Query An integer that specifies how many multiples of the returnLimit to skip and offset by before returning results, to enable paging. The default is 1.
returnLimit Query An integer that specifies how many results to return per page. The default is 50.
sortField Query A string containing the property by which the results should be sorted. Fields available for sorting through the API for the most part match those that appear as sortable columns in the Keyfactor Command Management Portal. The default sort field is Username.
sortAscending Query An integer that sets the sort order on the returned results. A value of 0 sorts results in ascending order while a value of 1 sorts results in descending order. The default is ascending.

Table 548: GET SSH Service Accounts Response Data

Name Description
ID The Keyfactor Command reference ID for the SSH service account. This ID is automatically set by Keyfactor Command.
ClientHostname A string indicating the client hostnameClosed The unique identifier that serves as name of a computer. It is sometimes presented as a fully qualified domain name (e.g. servername.keyexample.com) and sometimes just as a short name (e.g. servername). reference for the service account key. This field is used for reference only and does not need to match an actual client hostname. It is used when building the full user name of the service account key for mapping to Linux logons for publishing to Linux servers (e.g. username@client_hostname). The naming convention is to enter the hostname of the server on which the application that will use the private key resides (e.g. appsrvr12), but you can put anything you like in this field (e.g. cheesetoast).
ServerGroup

An array that indicates the SSH server group for the service account. The server group is used to control who has access in Keyfactor Command to the service account key. It does not limit where the key can be published. See SSH Permissions in the Keyfactor Command Reference Guide for more information. ClosedShow server group details.

User

An array containing information about the service account user. ClosedShow service account user details.

Username A string indicating the full username of the service account. The username is made up of the user name and ClientHostname entered when the service account is created (e.g. myapp@appsrvr75).
Tip:  For code examples, see the Keyfactor API Endpoint Utility. To find the embedded web copy of this utility, click the help icon () at the top of the Keyfactor Command Management Portal page next to the Log Out button.