SSH Nexus

Advanced SSH automation hub with intelligent connection management and network device support. Built with ❤️ by Sarryaz

Overview

The node provides advanced SSH-based file operations, specifically enabling downloading files from a remote system over SSH. It supports two configuration modes for the SSH connection: using stored credentials or dynamic parameters (host, port, username, password/private key) provided at runtime. This flexibility allows secure, reusable connections or dynamic workflows where connection details vary per execution.

In the 📥 Download File operation, the node connects to the specified remote host via SSH, downloads the target file or directory, and outputs it as binary data within the workflow. This is useful for automating retrieval of logs, reports, backups, or any files from remote servers or network devices.

Practical examples:

  • Automatically download daily log files from a Linux server for processing.
  • Retrieve configuration backups from network devices supporting SSH.
  • Fetch generated reports from remote systems in an automated pipeline.

Properties

Name Meaning
Configuration Mode Choose how to configure the SSH connection:
- Use Credentials: Use stored SSH credentials (recommended for security).
- Dynamic Parameters: Use dynamic parameters from previous nodes or environment variables.
Dynamic Host Hostname or IP address of the SSH server (required if using Dynamic Parameters mode). Supports expressions and environment variables.
Dynamic Port SSH port number (default 22). Supports expressions and environment variables.
Dynamic Username Username for SSH login (required if using Dynamic Parameters mode). Supports expressions and environment variables.
Dynamic Password Password for SSH login (optional if using private key). Supports expressions and environment variables.
Dynamic Private Key Private key content for SSH authentication (optional if using password). Supports expressions and environment variables.
File/Directory Path Full path on the remote system to the file or directory to download (required). Examples: /home/user/document.pdf or /var/log/.
💾 Output Binary Property Name of the binary property in the output where the downloaded file will be stored (required). Default is data.
Options → File Name Optional override for the filename of the downloaded binary data.
Options → Preserve Permissions Whether to preserve file permissions during transfer (default true).
Advanced Options → Command Timeout (ms) Maximum time to wait for command completion in milliseconds (default 30000 ms).
Advanced Options → Output Parsing How to process command output:
- Smart Parse (auto-detect)
- JSON Only
- Table Format
- Raw Text (Formatted)
- No Parsing (default: Smart Parse)
Advanced Options → Continue on Error Whether to continue processing remaining items if some commands fail (default false).
Advanced Options → Cipher Override Override cipher selection for this operation with options like secure-only, legacy-only, specific ciphers, or use credential settings (default: use credential settings).
Advanced Options → Try Fallback Ciphers Automatically try alternative ciphers if primary ones fail (default true).
Advanced Options → Retry Delay (ms) Delay between connection retry attempts in milliseconds (default 1000 ms).
Advanced Options → Verbose Logging Enable detailed logging for debugging connection issues (default false).
Advanced Options → Line Ending Style Line ending style for command execution:
- CR+LF (Windows style)
- LF (Unix style) (default CR+LF). Important for network devices.
Advanced Options → Device Type Select type of network device for optimized command handling:
Generic, Cisco IOS, Aruba OS/AP, Juniper, HP ProCurve, Dell PowerConnect, MikroTik (default Generic).

Output

The node outputs one item per input, each containing:

  • A json object with metadata about the download operation:
    • success: boolean indicating if the download succeeded.
    • path: the remote file path downloaded.
    • message: status message ("File downloaded successfully").
    • parseOutput: reflects the parsing option used.
  • A binary property containing the downloaded file's binary data under the user-specified binary property name (default "data"). This binary data can be used downstream in the workflow for saving, processing, or transferring.

Dependencies

  • Requires an SSH server accessible with valid credentials or dynamic parameters.
  • Uses the node-ssh library for SSH connections and file transfers.
  • Temporary local files are created during transfer using tmp-promise.
  • The node expects either stored SSH credentials configured in n8n or dynamic SSH connection parameters supplied at runtime.
  • No external API keys beyond SSH authentication are required.

Troubleshooting

  • Missing Credentials: If "Use Credentials" mode is selected but no credentials are configured, the node throws an error requiring SSH credentials.
  • Invalid Host or Port: Dynamic host must be a valid hostname or IP without invalid characters; port must be between 1 and 65535.
  • Empty or Unsafe Paths: Remote path cannot be empty or contain unsafe patterns like .., ~, or sensitive directories (/etc, /var/log) for upload operations (download is less restrictive but still requires valid paths).
  • Binary Property Missing: For download, the binary property name must be specified; otherwise, an error is thrown.
  • Connection Failures: Network issues, wrong credentials, or unsupported ciphers may cause connection failures. Enabling verbose logging helps diagnose these.
  • Timeouts: Long-running commands may timeout; adjust the command timeout in advanced options if needed.
  • File Transfer Errors: Permission issues or missing files on the remote system will cause errors during download.
  • Continue on Error: If enabled, the node will skip failed items instead of stopping the entire workflow.

Links and References

Discussion