Resources · n8n integration

n8n SSH nodeConfigure SSH in n8n.

The n8n SSH node runs commands on a remote machine and carries files in both directions. It ships with 3 operations spread over 2 resources, signs in with a password or a private key, and runs once for every item that reaches it. Handy when the work sits on a server, not behind an API.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n SSH node do in a workflow?

The n8n SSH node opens a Secure Shell session to a remote device and does one of three things: it executes a command, it downloads a file, or it uploads one. Nothing starts on its own here. A trigger sits in front of it, a Schedule Trigger or a Webhook (a URL another system calls), and the SSH node then runs once per item that arrives.

Think of the jobs that never made it into an API. A maintenance script on a box you own, a CSV that an old billing system drops into a folder every night, a build artifact that has to land in a specific directory before anything else can happen. Those are the moments the SSH node earns its place, and the three operations map onto them cleanly.

First scenario: a scheduled health command. A Schedule Trigger fires, Execute a command runs your script in the Working Directory you set, and the output travels on to a channel where someone will actually read it, often Slack. Second scenario: a nightly pull. Download a file grabs the export at its full Path, and the rows land in Google Sheets for the finance team. Third scenario: a delivery. A report generated earlier in the workflow gets pushed with Upload a file into a Target Directory on the server, no manual copy involved.

Two things are worth knowing before you build. Uploading needs the file to already exist as binary data on the item, so another node has to put it there first, a Read/Write Files from Disk node or an HTTP Request call that fetched it. And HTTP Request is not an alternative here: it calls HTTP endpoints, and SSH is not HTTP, so a missing shell capability cannot be patched with it.

The limits are easy to state. The node covers 3 operations and 2 resources, and the catalog lists version 1, so anything beyond running a command or shifting a single file has to be expressed as a command you write yourself. Values usually come from the item in front, through an expression such as {{ $json.path }}, which n8n resolves at run time. If you want the wider picture of where this node sits among the rest, the n8n review goes through the platform in detail.

Connect

How do you authenticate the SSH node?

  1. 01

    Pick an authentication method

    The node offers two ways in: password and privateKey. Password is the quickest to test with, private key is what most teams end up using on servers they administer. The choice is made on the credential itself, and a credential in n8n is a stored set of connection details you create once in the Credentials menu and reuse in every workflow afterwards.

  2. 02

    Create the credential in n8n

    Open the Credentials menu, create an SSH credential, and fill in the details for the method you chose. Because the credential lives outside the workflow, nothing sensitive sits in the node itself, and a second workflow that talks to the same machine selects the same credential from the dropdown rather than repeating the setup.

  3. 03

    Select it on the node and test

    Back in the node, pick the credential under Credential to connect with, then set the operation. Run the workflow once with a harmless command, something that only reads, so you can confirm the session opens before a real script touches anything. n8n shows the result on the output item, which is also where you will read the command output later.

Actions

Which operations does the SSH node expose?

The SSH node exposes 3 operations across 2 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceDownloadExecuteUpload
Command✓
File✓✓

Command

1 operation
01

Execute a command

command.execute

What you see in n8n

Notes & use cases

This operation runs a command on the remote device and hands the result back on the output item, so the rest of the workflow can branch on what came out.

Key parameters

  • Working Directory: required, the directory n8n executes the command in. Leave it empty and the node will not run.
  • Command: the command to be executed on a remote device. It accepts an expression, so {{ $json.script }} lets an earlier node decide what gets run.
Use cases
restarting a service after a deploy, or running a cleanup script every night and posting whatever it printed to the team channel.

File

2 operations
02

Download a file

file.download

What you see in n8n

Notes & use cases

Here the node pulls a file off the remote machine and attaches it to the item as binary data, ready for a parsing node or a storage node further down the line.

Key parameters

  • Path: required, the file path of the file to download. It has to contain the full path including file name, in the style of /home/user/invoice.txt.
  • File Property: required, the object property name which holds binary data on the output item.
  • File Name: an option, added from the Options collection with Add option, that overrides the binary data file name.
Use cases
collecting last night's export from a server that has no API and feeding it into a spreadsheet.
03

Upload a file

file.upload

What you see in n8n

Notes & use cases

Upload sends binary data that is already on the item over to the remote machine, which makes it the last step of a workflow that built or fetched a document earlier.

Key parameters

  • Input Binary Field: required, the name of the input binary field containing the file to be uploaded.
  • Target Directory: required, the directory to upload the file to, such as /home/user. The file name does not need to be specified, it is taken from the binary data file name.
  • File Name: the same Options field, used here to override that inherited name.
Use cases
dropping a generated invoice into the folder a legacy application watches.
Need help

Need help automating SSH with n8n?

A person reads every message.

FAQ

SSH node questions, answered

01Is the n8n SSH node included in n8n?
Yes. SSH is a core node, shipped with n8n itself, so there is nothing to install and no extra cost on the n8n side. It behaves the same way on n8n Cloud, the hosted offer run by n8n, and on a self hosted instance installed through Docker or npm under the Community Edition and its Sustainable Use license. A workflow built in one place opens identically in the other. What you do pay for, as always, is the machine you are connecting to and whatever your own hosting costs, but the node adds nothing on top of that.
02What do you need for the SSH node to work?
An SSH credential, and that is all. The node carries an authentication selector with two methods, Password and Private Key, stored as password and privateKey. You create the credential once in the Credentials menu, and every workflow that talks to that machine reuses it from a dropdown. There is no account to connect in the sense of an API integration, no app to authorize, no token to refresh. Beyond the credential, the node needs a trigger in front of it, because it never starts a workflow on its own.
03What are the limits of the SSH node?
The node exposes 3 operations across 2 resources, and the catalog reports version 1, so the surface is small on purpose. Execute a command, download a file, upload a file. Anything more elaborate has to be written as a command and passed to Execute. Upload also depends on binary data already sitting on the item, which means an earlier node has to supply it, a Read/Write Files from Disk node or an HTTP Request that fetched the file. A required field left empty blocks the run, and required fields change from one operation to the next.
04When should you use SSH rather than HTTP Request?
Whenever the remote system answers on a shell rather than on an API. The HTTP Request node calls any HTTP endpoint, which makes it the fallback when a dedicated node is missing an API operation, but it cannot speak a protocol that is not HTTP. SSH is one of those. So the split is simple: if the server exposes an HTTP endpoint that does what you want, use HTTP Request; if the only way in is a shell session, a file copy or a script on the machine, this node is the one. The two often sit in the same workflow, one fetching, the other placing.
05n8n or Make for running remote commands?
It depends on where the machine lives and who is allowed to reach it. Make is a hosted automation platform with no self hosting option, billed per operation, with its own visual logic. n8n runs on n8n Cloud or on your own server, which matters here more than usual: a command over SSH often targets a machine inside a private network, and a self hosted n8n sits inside that network already. On cost, per operation billing is predictable for steady volumes, while a self hosted instance shifts the cost to the infrastructure. Pick on hosting, data control, cost model and how the visual editor fits your team.