SSH Nexus

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

Overview

This node provides advanced SSH automation capabilities, including executing commands and retrieving system information from remote systems via SSH. Specifically, the System Information > Disk Usage operation connects to a remote machine over SSH and runs the df -h command to fetch disk usage statistics in a human-readable format.

Common scenarios where this node is beneficial include:

  • Monitoring disk space on remote Linux/Unix servers.
  • Automating system health checks as part of larger workflows.
  • Integrating disk usage data into dashboards or alerting systems.

Example use case: Automatically retrieve disk usage from multiple servers daily and trigger alerts if free space falls below a threshold.

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 for SSH connection (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 SSH username (required if using Dynamic Parameters mode). Supports expressions and environment variables.
Dynamic Password SSH password (optional). Supports expressions and environment variables.
Dynamic Private Key SSH private key content (optional). Supports expressions and environment variables.
Advanced Options Collection of optional settings:
- Command Timeout (ms): Max wait time for command execution.
- Output Parsing: How to parse command output (smart, json, table, raw, none).
- Continue on Error: Whether to continue processing other items if one fails.
- Cipher Override: Select specific SSH ciphers.
- Try Fallback Ciphers: Enable fallback cipher attempts.
- Retry Delay (ms): Delay between retry attempts.
- Verbose Logging: Enable detailed debug logs.
- Line Ending Style: CRLF (Windows) or LF (Unix).
- Device Type: Select device type for optimized handling (generic, Cisco IOS, Aruba OS, etc.).

Output

The node outputs an array of JSON objects, each corresponding to an input item processed. For the Disk Usage operation, the output JSON structure includes:

  • raw: The raw string output of the df -h command.
  • lines: Array of non-empty lines from the output.
  • wordCount: Number of words in the output.
  • stderr: Any error output captured during command execution.
  • exitCode: Exit code of the command (0 indicates success).
  • parseOutput: The parsing mode used (e.g., smart).
  • Additional fields may be present depending on parsing mode.

If output parsing is enabled (default smart), the node attempts to convert the raw text into structured data (e.g., tables or JSON). If disabled (none), only raw text and basic metadata are returned.

No binary data is produced by this operation.

Dependencies

  • Requires an active SSH server accessible with provided credentials or dynamic parameters.
  • Needs either stored SSH credentials configured in n8n or dynamic SSH connection parameters supplied at runtime.
  • Uses the node-ssh library internally for SSH connections.
  • No external API keys beyond SSH authentication are required.
  • Recommended to configure SSH credentials securely within n8n for best security practices.

Troubleshooting

  • Connection failures: Ensure SSH host, port, username, and authentication method (password/private key) are correct and reachable from the n8n instance.
  • Invalid host format error: Hostnames must contain only letters, numbers, dots, and hyphens.
  • Port number errors: Port must be between 1 and 65535.
  • Timeouts: Increase "Command Timeout" in Advanced Options if commands take longer than default 30 seconds.
  • Parsing issues: If output parsing fails or produces unexpected results, try changing the "Output Parsing" option to raw or none.
  • Permission denied: Verify SSH user has permission to run df -h on the remote system.
  • Continue on Error: Enable this option to allow processing of remaining items even if some fail.
  • Verbose Logging: Enable to get detailed debug logs useful for diagnosing connection or command execution problems.

Links and References

Discussion