Command Set
If you try to run two policies containing SSH objects at the same time, then unexpected errors can occur. For example, the first policy can send commands in the SSH session created by the second policy. These errors occur because a class which handles the SSH connection is static.
Send one or multiple commands to a remote device. Commands are added one at a time and executed in order from top to bottom. Output of an executing command is parsed for configured Expect statements to inform the executing device when the executed command is complete and the next command can be sent. Expect statements are not required for all commands but should be used if executed command produces several lines of output.
If this Object is used in an Automation Manager Policy that attempts to connect to a target device that is configured to use only SSH-2, the Policy may fail as the connection can be refused due to an invalid server version string error. This error will not occur for target devices that are configured to use only SSH-1 or to use either SSH-1 or SSH-2.
Input Parameters
Input parameters are added by use of the Add button. Added input parameters can be deleted by selecting an existing input parameter and choosing the Remove button.
Name | Type | Required | Description |
---|---|---|---|
Command | String | Yes | Command to be executed on the remote device. |
Expect | String | No | Statement to parse output for determining when the executed command has been completed. |
Output Parameters
Name | Type | Description |
---|---|---|
SSHOutput | String | The Output produced from executing a command on the remote device. |
Result | Number | Returns a success value of zero or any value other than zero to indicate failure. |
Example Input Parameters
Name | Type | Required | Example |
---|---|---|---|
Command | String | Yes | show running-config |
Expect | String | No | Hostname# |
Command | String | Yes | show interfaces |
Expect | String | No | Hostname# |