GET SSH Servers

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./Servers method is used to retrieve one or more SSH servers defined in Keyfactor Command. Results can be limited to selected servers 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 servers.

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 to which the server belongs and limited for users with only the ServerAdmin role. For more information, see SSH Permissions in the Keyfactor Command Reference Guide.

Table 512: GET SSH Servers 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 SSH Server 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:

  • Agent (Agent ID)

  • Hostname

  • Orchestrator (ClientMachine)

  • ServerGroup (Server Group Id)

  • ServerGroupName

  • ServerGroupOwner (Username)

  • EnforcePublishPolicy (UnderManagement) (true, false)

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 Hostname.
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 513: GET SSH Servers Response Data

Name Description
ID An integer indicating the Keyfactor Command reference ID for the SSH server. This ID is automatically set by Keyfactor Command.
AgentId A string indicating the Keyfactor Command reference GUID for the SSH orchestratorClosed Keyfactor orchestrators perform a variety of functions, including managing certificate stores and SSH key stores. controlling the SSH server.
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).

A string indicating the hostname of the SSH server.

ServerGroupId A string indicating the Keyfactor Command reference GUID for the SSH server group to which the server belongs.
SyncSchedule

An array providing the inventory schedule for the SSH server group to which the SSH server belongs. Inventory schedules cannot be set on an individual SSH server basis. The schedule can be off (unset) or one of the supported values. ClosedShow schedule details.

For example:

"SyncSchedule": {
   "Weekly": {
      "Days": [
         "Monday",
         "Wednesday",
         "Friday"
      ],
      "Time": "2022-11-20T14:00:00Z"
   }
}
UnderManagement A Boolean indicating whether the SSH server is in inventory only mode (False) or inventory and publish policy mode (True).
Tip:  If the server group associated with the SSH server is in inventory and publish policy mode, you will not be able to configure the server in inventory only mode.
Owner

An array that indicates the Active Directory user who owns the server group to which the server belongs. The owner can only be set by a Keyfactor Command user with the SSH Enterprise Admin role. See SSH Server Groups in the Keyfactor Command Reference Guide for more information. ClosedShow owner details.

GroupName A string indicating the SSH server group to which the SSH server belongs. See SSH Server Groups in the Keyfactor Command Reference Guide for more information.
Orchestrator

A string indicating the name the SSH orchestrator provided to Keyfactor Command when it registered. This value is configurable when the orchestrator is installed.

For more information about the orchestrator, see Bash Orchestrator in the Keyfactor Orchestrators Installation and Configuration Guide.

Port An integer indicating the port that is configured for SSH on the SSH server. The default is 22.
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.