SSH Script Execution

SSH Script Execution sensor is used to execute a script on the specified host over SSH.

This sensor supports selecting values from dictionaries.

Parameters

Parameter Description

Host

Host where the script will be executed.

Port

Host’s port.

Subtype

Type of the script that will be executed. The system has the following types – Program/script in the file system, Script from repository and Script with text.

Work directory

Script’s working directory.

Script / Executable file

Depends on the subtype. It is a dropdown for the Script from repository subtype, text input field for the Program/script in the file system subtype, and a code input field for the Script with text subtype.

Arguments

Arguments passed to the script.

If an argument contains a string with spaces, it needs to be specified in its own field.

SudoAuth

Use elevated privileges to execute the script.

Sudo Username

Name of the user with elevated privileges.

Sudo Password

Password of the user with elevated privileges.

Auth

SSH authentication settings. The system allows authentication by password (Password option) and private key (SSH private key and SSH private key location options).

Username

Login of the SSH user.

Password

Password for SSH authentication. Only for Password option.

SSH private key location

Path to the file with the private key. This file should be on the same host as Agent. Only for SSH private key location option.

SSH private key

Contents of the private key. Only for SSH private key location option. This field can be encrypted.

Result

If the check was successful, the Data section will contain the information listed in the table below.

Field Description

exitCode

Script’s exit code.

stdout

Script’s output in the stdout stream.

stderr

Script’s error output in the stderr stream.