Home Search

DriveWorks Pro 21
Run SSH Command

Send Feedback

Run SSH Command

This Specification Task will run a SSH Command.

Properties

Property NameDescription
TitleChanges the Title (not the name) of the task.
Host NameThe hostname or IP address of the SSH client.
UsernameAuthentication username.
PasswordAuthentication password.
CommandThe command text.
Result ConstantThe name of the constant that the result will be posted to (With or without the DWConstant prefix)

Example

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
Host Name"Pi2"Pi2This is the hostname of the SSH client.
Username"KPIAdmin"KPIAdminThis is the username to log into the client with.
Password"KPI123"KPI123This is the password to log into the client with.
Command"sudo reboot now"sudo reboot nowThis command will reboot the machine.
Result Constant"DWConstantSSHReport"DWConstantSSHReportThis is the name of the Constant that will report the result.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • SSH command executed and the resulting message contains data.

Success with Warnings

  • SSH command executed but came back with an empty result message.

Failed (one of the following occurred)

  • Lost connection during/after executing SSH command (for example "sudo reboot now" command).
    A command that causes the host to reboot or lose connection will report failed even though it may have been successful.
  • One of the required properties is empty.
  • General failure - Check the Specification report for more details.