YAML for SSH Command

View as Markdown

Execute shell commands on remote servers via SSH connection.

YAML parameters for SSH Command

PARAMETERS
commandsrequiredstring
Shell commands to execute on the remote server.
typerequiredstring

Value: SSH_COMMAND

actionrequiredstring
Unique identifier for the action within the pipeline.
targetsobject[]
List of target servers to execute commands on.
run_as_scriptboolean
When true, run commands as a script file instead of line by line.
working_directorystring
Directory on the remote server where commands are executed.
shellstring enum
The shell used to execute commands. Default: SH.
Allowed enum:
SH,
BASH,
POWERSHELL
execute_every_commandboolean
When true, execute all commands even if earlier ones fail.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
Defines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Sep 7, 2026

YAML examples for SSH Command

SSH commands to multiple servers

yaml
- action: Deploy to production servers type: SSH_COMMAND trigger_time: ON_EVERY_EXECUTION disabled: false working_directory: /var/www/app commands: |- cd /var/www/app git pull origin main composer install --no-dev --optimize-autoloader php artisan migrate --force php artisan config:cache sudo systemctl reload php-fpm ignore_errors: false retry_interval: 60 retry_count: 3 run_as_script: false shell: BASH timeout: 3600 execute_every_command: true targets: - target: prod-web-1 type: SSH name: Production Web Server 1 host: web1.prod.example.com port: 22 path: /var/www auth: method: PASSWORD username: deployer password: $SSH_PASSWORD tags: - primary - production - web - target: prod-web-2 type: SSH name: Production Web Server 2 host: web2.prod.example.com port: 2222 path: /var/www auth: method: SSH_KEY username: deployer passphrase: $KEY_PASSPHRASE key: $SSH_PRIVATE_KEY tags: - production - web - secondary

Simple SSH command

yaml
- action: Simple SSH type: SSH_COMMAND trigger_time: ON_EVERY_EXECUTION commands: "echo 'Hello World'" targets: - target: server type: SSH host: example.com auth: method: PASSWORD username: user