Share via


Run SSH Command

Applies To: Opalis 6.3

The Run SSH Command object opens an SSH connection to a remote server and runs shell commands on that server. This object uses a satellite license.

Use the Run SSH Command object to run backup applications or a batch script that runs a set of complex commands on a non-Windows computer. The Run SSH Command object can run any command in a Secure Shell.

Configuring the Run SSH Object

To configure the Run SSH Command object you need to know the connection information for the computer that hosts the SSH server that you want to connect to, and the commands that you want to run. Depending on your SSH server, you may require a key file to log into the server before being able to run commands.

To configure the Run SSH object

  1. From the Objects pane, drag a Run SSH object to the active Policy.

  2. Double-click the Run SSH object icon. The Properties dialog opens.

  3. For information about the settings on the Details tab and the Advanced tab see the following tables.

  4. For information about the settings on the General tab, the Run Behavior tab, and other tabs if applicable, see Common Tabs.

Details Tab

Element Configuration Instructions

Computer

Type the name of the computer where the SSH server is running. Type the name of the computer where the SSH server is running You can also use the ellipsis ( ... ) button to browse for the computer.

Port

Type the port number that you need to use to connect to the SSH server.

Run Command

Select this option and type the command that you want to run on the SSH server after the connection has been established.

Command Set File

Select this option and specify a file that contains a set of commands that will be run on the SSH server when the connection has been established. The command set file must use the scripting language of the native shell on the SSH server.

Accept Host Key Change

Select this option to accept host key changes when they occur.

Connection Timeout

Specify the amount of time, in seconds, that the Run SSH Command object will wait for the SSH command to complete. Configure a value of 0 (zero), or leave the box blank, to wait indefinitely.

After the timeout period has elapsed, the Run SSH Command object times out and returns a warning. The command that you ran may continue running, regardless of whether the Run SSH Command object times out.

Advanced Tab

Element Configuration Instructions

Username

Type the username that you need to log into the SSH server.

Password/Confirm

Select this option and type the password that is associated with the Username that you specified.

Key File

Select this option to specify a key file to use. You must use the PuTTY key file generator, found on the Opalis installation CD, to create a key file.

Passphrase/Confirm

Type the passphrase that is associated with the key file that you specified.

Run SSH Object Published Data

The following table lists the element names and descriptions of the data published by this object. For information about the published data elements that are common to all objects, see Policy Workflow Rules.

Element Name Description

Command

The command that was executed on the SSH server. This data is not available when the Command Set File option is selected.

Command Set file

The command set file that was used to run commands on the SSH server. This option is not available when the Run Command option is selected.

Computer name

The name or IP address of the SSH server.

Execution Result

The text that was returned as output from the commands that were run on the SSH server.

Exit Code

The exit code returned by the command. When using a command set file, this will be the exit code of the last command in the file.

Key file path

The path of the key file that was used to authenticate with the SSH server.

Port

The port used to connect to the SSH server.

Username

The username used to log into the SSH server.