Skip to main content

Run SSH commands

Description

Run SSH Commands executes shell commands on remote machines over the SSH protocol and captures the standard output and error responses. Use this step when your workflow needs to perform operations on a remote server — for example, restarting a service, checking disk space, running a database backup script, or retrieving system status information. The command output is returned as fields that downstream steps can parse, log, or act on.

Configurations

Field NameDescription
General Tab
Step nameSpecify the name of the step as it appears in the workflow workspace. This name has to be unique in a single workflow.
Server name / IP addressSpecify the server or IP address of the machine on which you want to execute a command.
Server portSpecify the TCP/IP port on which ssh protocol lives on the server. The default is 22.
TimeoutSpecify the timeout in seconds. If set to a number larger than zero you can specify a non-default connection timeout.
UsernameSpecify the username to log in with
PasswordSpecify the password to use
Use keyEnable this option if you want to log in using a private key
Private keyThe private key file. The private part of a private/public RSA key-pair (see:ssh-keygen)
PassphraseSpecify the optional pass-phrase used when the key-pair was generated
Proxy hostSpecify the proxy server host to use (name or IP address)
Proxy portSpecify the proxy server port to use
Proxy usernameSpecify the proxy user name
Proxy passwordSpecify the proxy password
"Test connection" buttonClick to see if the supplied credentials are sufficient for logging into the SSH server.
Settings Tab:
Output
Response fieldnameSpecify the name of the String output field that will contain the text passed to the standard output channel (stdout) by the specified commands.

This information can then be picked up by the step and passed in a field to subsequent steps.

Error response field nameThe name of the String output field that will contain the text passed to the standard error channel (stderr) by the specified commands.

This information can then be picked up by the step and passed in a field to subsequent steps.

Commands:
Get commands from fieldEnable this option if you want to execute commands specified in an input field
Commands field nameSelect the input field that will contain the commands to execute
CommandsField allows you to specify the commands to execute.
Wait for responseSpecify the Wait for response time in seconds. If it is more than zero seconds, the step waits to get the command output for the specified seconds.

Internally, it checks for a response after every 15 seconds. If the command output does not receive a response in the specified time, then the step exits with an error.