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
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.
How do you authenticate the SSH node?
- 01
Pick an authentication method
The node offers two ways in:
passwordandprivateKey. 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. - 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.
- 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.
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.
Operations index
Command
1 operationExecute a command
command.executeWhat 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.
File
2 operationsDownload a file
file.downloadWhat 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.
Upload a file
file.uploadWhat 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.
Need help automating SSH with n8n?
A person reads every message.



