Search all guides

Reference · Tools

SSH integration

Connect to remote servers to execute shell commands and transfer files using the SSH protocol.

Action (binary) Development v1 Binary data

The SSH node runs commands and transfers files on remote servers over SSH and SFTP, authenticating with a password or a private key. A typical build is fetching a log file from a server for analysis, or running a maintenance command as part of a scheduled workflow.

Works as
Action (binary)
Tool name
ssh
Operations
1 — Execute
Parameters
14
Outputs
Output, Error
Credentials
SSH Credentials
Official docs
SSH docs datatracker.ietf.org

What you can build with SSH

  • Run a shell command on a remote server and get the output.
  • Download a log file from a remote server via SFTP.
  • Upload a report to a remote server via SFTP.
  • Execute a deploy script on a production server.
  • Transfer backup files from a remote server.

Overview

The SSH tool connects to remote servers over the SSH protocol to execute shell commands, download files via SFTP, and upload files via SFTP. It supports both password and private key authentication. Commands return stdout, stderr, exit code, and signal. File downloads produce binary items stored in the binary store. File uploads read binary data from upstream items and send them to a remote path via SFTP. A single SSH connection is established per execution batch for efficiency.

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires SSH Credentials credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Commandcommand
Filefile

Operations

Command

OperationValueDescription
ExecuteexecuteExecute a command on the remote server

File

OperationValueDescription
DownloaddownloadDownload a file from the remote server via SFTP
UploaduploadUpload a file to the remote server via SFTP

Parameters

Command: Execute

ParameterTypeRequiredDefaultDescription
CommandstringYes—The shell command to execute on the remote server.
Working DirectorystringNo—Optional working directory for command execution. When set, the tool wraps the command as sh -c 'cd <cwd> && <command>', which requires the remote server to have /bin/sh (true for OpenSSH-style servers). Leave empty for compatibility with restricted servers (e.g. Rebex demo) that whitelist specific commands and refuse sh. Supports ~/ for home directory.
Timeout (ms)numberNo60000Maximum time in milliseconds to wait for the command to complete before killing it.
Max Output BytesnumberNo5242880Maximum bytes of stdout/stderr to capture per stream. Output beyond this is truncated and a “truncated” flag is set.
Fail on Non-Zero ExitbooleanNotrueIf true, a non-zero exit code is treated as an error and routed accordingly.

File: Download

ParameterTypeRequiredDefaultDescription
Path (path)stringYes—Full remote file path including file name. Supports ~/ for home directory.
Binary Property (binaryPropertyName)stringYesdataName of the output binary property to store the downloaded file. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
OptionscollectionNo{}Additional options for file operations.
— File NamestringNo—Override the file name from the binary data or remote path.

File: Upload

ParameterTypeRequiredDefaultDescription
Input Binary Field (binaryPropertyName)stringYesdataName of the input binary field containing the file to upload. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Target Directory (path)stringYes—Remote directory to upload the file to. The file name is taken from binary data. Supports ~/ for home directory.
OptionscollectionNo{}Additional options for file operations.
— File NamestringNo—Override the file name from the binary data or remote path.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo1Maximum number of items to process concurrently. Keep low for SSH connections (default 1).

This node’s parameters are sent to the server literally. {{ ... }} expressions in Command, Path, Target Directory or Working Directory are not resolved against the item — they travel to the remote host as the text you typed. Build a dynamic command or path in an upstream node (for example Edit Fields) and select that field here instead.

Output Data

One output item per input item — no operation fans out. What lands on the item differs sharply per operation:

OperationOutput item
command / executeThe item JSON is replaced by the command result. Upstream fields do not pass through. Binary is forwarded unchanged.
file / downloadThe item JSON passes through unchanged; the downloaded file is added to the item’s binary data under the Binary Property name, alongside any binary the item already carried.
file / uploadThe item JSON is replaced by { "success": true }. Upstream fields do not pass through. Binary is forwarded unchanged.

A command result looks like this:

{
  "stdout": "total 48\ndrwxr-xr-x 6 user user 4096 Jan 15 10:30 .",
  "stderr": "",
  "code": 0,
  "signal": null
}
  • code is the process exit status and signal is the signal that killed it, or null.
  • truncated: true is added when either stream hit Max Output Bytes and was cut short.
  • With Fail on Non-Zero Exit on (the default), a non-zero code is turned into an item error. The error item still carries stdout, stderr, code and signal, so you can read the failing output on the Error branch. Turn the option off to treat a non-zero exit as an ordinary result and inspect code yourself.

On download, the file name is taken from the remote path unless you override it with the File Name option. On upload, the file name comes from the binary data’s own file name unless File Name overrides it; if neither is available the item fails.

Reference the result downstream by expression, e.g. {{ $json.stdout }}.

Example Configuration

Run a command and capture its output:

{
  "type": "ssh",
  "parameters": {
    "resource": "command",
    "operation": "execute",
    "command": "systemctl status nginx",
    "timeoutMs": 60000,
    "maxOutputBytes": 5242880,
    "failOnNonZeroExit": true
  }
}

Run a command from a working directory, tolerating a non-zero exit:

{
  "type": "ssh",
  "parameters": {
    "resource": "command",
    "operation": "execute",
    "command": "ls -la",
    "cwd": "/var/log",
    "failOnNonZeroExit": false
  }
}

Download a log file into the item’s binary data:

{
  "type": "ssh",
  "parameters": {
    "resource": "file",
    "operation": "download",
    "path": "~/logs/application.log",
    "binaryPropertyName": "logFile"
  }
}

Upload a file from an upstream node, renaming it on the server:

{
  "type": "ssh",
  "parameters": {
    "resource": "file",
    "operation": "upload",
    "path": "/etc/myapp/",
    "binaryPropertyName": "data",
    "options": {
      "fileName": "config.yml"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool executes commands and transfers files on remote servers using SSH/SFTP. It is ideal for running shell commands, downloading files, or uploading files when secure remote server interaction is needed. The tool produces command output, downloaded files, or confirmation of uploaded files.

Frequently asked questions

Can it transfer files as well as run commands?

Yes — SFTP transfer sits alongside command execution, so a workflow can run something remotely and then collect what it produced.

Which authentication methods are supported?

Password and private key. Key-based authentication is the safer choice for automation, since it avoids storing a reusable password.

How does this differ from Execute Command?

Execute Command runs locally in the workflow's own execution environment. This node runs on a remote host you connect to.

Which credential does it need?

An SSH credential holding the host details and either the password or the private key.

Build with SSH

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need SSH Credentials credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.