Overview
This node enables uploading files to a remote server via SSH. It connects to the target host using provided credentials and transfers binary file data from the workflow to a specified directory on the remote machine. This is useful for automating deployment tasks, backing up files, or integrating with systems that require secure file transfer over SSH.
Typical use cases include:
- Uploading configuration files or scripts to remote servers.
- Automating file deployments in CI/CD pipelines.
- Transferring generated reports or logs securely to a remote location.
For example, you might use this node to upload a build artifact from your workflow to a production server's /var/www/html directory.
Properties
| Name | Meaning |
|---|---|
| Host | The IP address or hostname of the SSH server to connect to (e.g., 127.0.0.1). |
| Port | The port number for the SSH connection (default is 22). |
| Username | The username to authenticate as on the remote server. |
| Authentication | Method of authentication: either Password or Private Key. |
| Password | The password for SSH authentication (used if "Password" is selected). |
| Private Key | The private key string for SSH authentication (used if "Private Key" is selected). |
| Passphrase | Optional passphrase for the private key if it is encrypted. |
| Input Binary Field | The name of the input binary property containing the file data to upload (default is data). |
| Target Directory | The remote directory path where the file will be uploaded (e.g., /home/user). |
| Options > File Name | Optional override for the file name used when uploading. If not set, the original binary file name is used. |
Output
The node outputs an array of items corresponding to each input item processed. For each successful upload, the output JSON contains:
{
"success": true
}
The output is paired with the input item index to maintain correspondence.
No binary data is output by this node; it only confirms success or returns error information if the upload fails.
Dependencies
- Requires an active SSH server accessible at the specified host and port.
- Needs valid SSH credentials (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 upload using the system's temporary directory.
Troubleshooting
- Invalid Path Error: Paths starting with
~but not followed by/are rejected. Use full paths or~/to indicate home directory. - Authentication Failures: Ensure correct password or properly formatted private key and passphrase are provided.
- File Not Found in Binary Data: The specified binary property must exist and contain valid file data.
- Permission Denied on Remote Server: Verify the user has write permissions to the target directory.
- Connection Timeout or Refused: Confirm network connectivity and SSH server availability on the given host and port.
- Temporary File Cleanup: The node uses temporary files for upload; ensure the environment allows creating and deleting temp files.
If errors occur and "Continue On Fail" is enabled, the node will return error messages per item instead of stopping execution.