-
Notifications
You must be signed in to change notification settings - Fork 24
DiscoverSshHostKey
Miriam McMahon edited this page Apr 27, 2023
·
6 revisions
Retrieves the SSH host key of a remote host.
Parameter Name | Description | Type | Resolved Type | Required |
---|---|---|---|---|
HostKeyVariableName | The name of a variable that will contain the host key. To make this key available to Safeguard, the variable should then be saved by calling WriteResponseObject | String | String | Yes |
SoftwareVersionVariableName | The name of a variable that will contain server software name and version reported by the server, if available | String | String | No |
NetworkAddress | The ip address or host name of the remote host | Value | String | Yes |
Port | The optional port number. If not specified, the default SSH port will be used | Value | Integer | No |
AutoAdjustCiphers | Adjust or not the list of Ciphers when connecting to the SSH server (deprecated in Safeguard v6.13) | Boolean | Boolean | No |
Timeout | Optional Timeout for the connection attempt. If not specified, the default SSH timeout will be applied | Value | Integer | No |
Example:
{
"Try": {
"Do": [
{
"DiscoverSshHostKey": {
"HostKeyVariableName": "MyHostKey",
"SoftwareVersionVariableName": "GLOBAL:ServerSoftwareName",
"Port": "%Port%",
"NetworkAddress": "%Address%",
"Timeout": "%Timeout%"
}
},
{
"Log": {
"Text": "Host %Address% with server version %ServerSoftwareName% reports host key %MyHostKey%"
}
},
{
"WriteResponseObject": { "Value": "%MyHostKey::$%" }
}
],
"Catch": [
{
"Throw": { "Value": "%Exception%" }
}
]
}
}