Overview
This node enables executing SSH commands and transferring files over SSH connections. Specifically, the File - Download operation allows users to download a file from a remote server via SSH and output it as binary data within the workflow.
Common scenarios include:
- Automating retrieval of log files or reports from remote servers.
- Integrating remote file contents into workflows for further processing.
- Backing up files from remote systems automatically.
For example, you can configure this node to connect to a Linux server, specify the full path of a file (e.g., /home/user/invoice.txt), and download it so that subsequent nodes can process or store the file content.
Properties
| Name | Meaning |
|---|---|
| Connection Type | Choose how to provide connection details: either use stored credentials or specify parameters dynamically. |
| Authentication | Select authentication method: Password or Private Key. |
| Host | Hostname or IP address of the SSH server (required if using dynamic parameters). |
| Port | Port number of the SSH server (default 22, required if using dynamic parameters). |
| Username | Username for SSH authentication (required if using dynamic parameters). |
| Password | Password for SSH authentication (required if using password authentication with dynamic parameters). |
| Private Key | Private key string for SSH authentication (required if using private key authentication with dynamic parameters). |
| Passphrase | Passphrase for the private key, if applicable (used with private key authentication). |
| Path | Full file path on the remote server to download (including filename). |
| File Property | Name of the property in the output item where the binary file data will be stored (default: data). |
| Options → File Name | Optional override for the downloaded file's name in the binary data. |
Output
The node outputs an array of items corresponding to each input item. For the File - Download operation:
- Each output item contains the original JSON data from the input.
- A binary property (named as specified by the "File Property" input) is added containing the downloaded file's data.
- The binary data includes the file content and metadata such as the file name (which can be overridden).
- If the input item already contained binary data, it is preserved and merged with the new binary file.
This structure allows downstream nodes to access the downloaded file directly as binary data for further processing, storage, or transmission.
Dependencies
- Requires an SSH server accessible with provided credentials.
- Supports two authentication methods: password or private key (with optional passphrase).
- Uses the
node-sshlibrary internally to manage SSH connections and file transfers. - Temporary local files are created during download using a temporary file utility and cleaned up afterward.
- No additional external services or environment variables are required beyond valid SSH credentials.
Troubleshooting
- Invalid Path Error: Paths starting with
~but not followed by/are rejected. Use~/to represent the home directory or provide the full absolute path. - Connection Failures: Errors connecting to the SSH server may indicate incorrect host, port, username, or authentication details. Verify credentials and network accessibility.
- Permission Denied: Ensure the SSH user has read permissions for the specified file path on the remote server.
- File Not Found: Confirm the full path including filename is correct and the file exists on the remote system.
- Binary Data Missing: Check that the "File Property" name matches downstream expectations and that the file was successfully downloaded.
- Cleanup Issues: Temporary files are cleaned up after download; failures here are rare but could occur if the system temp directory is inaccessible.
If the node is set to continue on failure, errors for individual items will be returned in their JSON output under an error field.