SSH

App · 3 actions

Run commands on your own servers over SSH and use what they print.

Actions

ActionWhat it does
Download a fileFetch a file from the connected server and store it, ready to read with Read a file, attach to an email, or upload somewhere else.
Run a commandRun a command on the connected server, as you would type it at its prompt, and get back what it printed and its exit code.
Upload a filePut a file on the connected server: an upload, an email attachment, or a file an earlier step made or downloaded.

Download a file

Fetch a file from the connected server and store it, ready to read with Read a file, attach to an email, or upload somewhere else. Files are kept for 30 days.

Inputs

PathpathtextRequired
The file's full path on the server, such as /var/backups/db.sql.gz, or its path inside the user's home folder.

Outputs

The downloaded file, stored for 30 days. Pass document_ref to any step that takes a file, or documents to one that takes several, such as an email's attachments.

content_typetext
The file's type, worked out from its name.
document_reftext
The stored file's id, for later steps.
documentslist
The same file as a one-entry list, the shape a download step returns.
filenametext
The file's name.
modified_attext
When the file was last changed on the server, in UTC.
pathtext
Where it was on the server.
size_bytesnumber
The file's size.
Example output
{
  "content_type": "application/gzip",
  "document_ref": "doc_01HZX3Q9V7K2M4N6P8R0S2T4V6",
  "documents": [
    {
      "content_type": "application/gzip",
      "document_ref": "doc_01HZX3Q9V7K2M4N6P8R0S2T4V6",
      "filename": "db.sql.gz",
      "size_bytes": 1048576
    }
  ],
  "filename": "db.sql.gz",
  "modified_at": "2026-11-30T02:00:00Z",
  "path": "/var/backups/db.sql.gz",
  "size_bytes": 1048576
}

Run a command

Run a command on the connected server, as you would type it at its prompt, and get back what it printed and its exit code. Use it to deploy, restart a service, check disk space, read a log, or run a script that lives on the server.

Inputs

CommandcommandtextRequired
What to run on the server, exactly as you would type it at its prompt. It runs as the connected user, in that user's shell, so chain commands with && and quote values that contain spaces. Values from earlier steps can be put into it.
Working directoryworking_directorytext
Run the command from this folder on the server, such as /var/www/app. Leave it empty to run from the user's home folder.
Time limit (seconds)timeoutnumber
Stop the command and fail the step if it has not finished within this many seconds. A command that waits for input never finishes, so give it none.From 1 to 3600. Default: 60.
If the command failson_errortext
What to do when the command exits with a status other than 0. Continuing lets later steps read the exit code and the error output themselves, which suits a check whose failure is an answer rather than a problem.One of: fail (Stop the workflow), continue. Default: fail.

Outputs

exit_codenumber
The command's exit status: 0 when it succeeded. -1 when it ended without reporting one, which usually means it was killed.
oktrue/false
Whether the exit code was 0.
stderrtext
What the command printed to its error stream, without the line break it ended with. Many commands print progress and warnings here even when they succeed.
stdouttext
What the command printed, without the line break it ended with.
Example output
{
  "exit_code": 0,
  "ok": true,
  "stderr": "",
  "stdout": "Filesystem      Size  Used Avail Use% Mounted on\n/dev/sda1        80G   41G   39G  52% /"
}

Upload a file

Put a file on the connected server: an upload, an email attachment, or a file an earlier step made or downloaded. The folder is created if it isn't there yet, and the file keeps its own name unless you give it another.

Inputs

FilefiletextRequired
The file to upload. Upload one, or pick a file from an earlier step, such as an email attachment.
FolderfoldertextRequired
The folder on the server to put it in, such as /home/deploy/uploads, or a folder inside the user's home folder, such as uploads. It is created, with any folders above it, if it doesn't exist.
File namefilenametext
The name to save the file under, such as report.csv. Leave it empty to keep the file's own name.
If a file of that name is thereif_existstext
Replace the file already on the server, or stop the workflow and leave it as it is.One of: replace (Replace it), fail (Stop the workflow). Default: replace.

Outputs

filenametext
The name it was saved under.
foldertext
The folder it was put in.
pathtext
The file's full path on the server.
replacedtrue/false
Whether a file of that name was already there and was replaced.
size_bytesnumber
How many bytes were uploaded.
Example output
{
  "filename": "report.csv",
  "folder": "/home/deploy/uploads",
  "path": "/home/deploy/uploads/report.csv",
  "replaced": false,
  "size_bytes": 2048
}

On this page