SSH Nexus
Actions22
- Command Execution Actions
- File Operations Actions
- Network Device Actions
- System Information Actions
- Connection Health Actions
Overview
The node "SSH Nexus" provides advanced SSH automation capabilities, including executing commands, managing files, interacting with network devices, retrieving system information, and monitoring connection health over SSH. It supports both static credential-based and dynamic parameter-based SSH connection configurations.
For the System Information resource with the System Info operation, the node connects to a remote system via SSH and retrieves various system statistics such as:
- System overview (
uname -a) - Running processes (
ps aux) - Disk usage (
df -h) - Memory info (
free -h)
This is useful for administrators or automated workflows that need to monitor or audit remote systems' status and performance metrics.
Practical examples:
- Automatically gather system details from multiple Linux servers for inventory or compliance.
- Monitor disk space and memory usage remotely to trigger alerts or scaling actions.
- Collect running process lists for troubleshooting or security audits.
Properties
| Name | Meaning |
|---|---|
| Configuration Mode | Choose how to configure the SSH connection: • Use Credentials (recommended for security) • Dynamic Parameters (from previous nodes or environment variables) |
| Dynamic Host | Hostname or IP address of the target system (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 if using password authentication). Supports expressions and environment variables. |
| Dynamic Private Key | SSH private key content (optional if using key authentication). Supports expressions and environment variables. |
| Advanced Options | Collection of optional settings: • Command Timeout (ms): max wait time for command execution (default 30000) • Output Parsing: how to parse command output (smart/json/table/raw/none) • Continue on Error • Cipher Override: override ciphers used • Try Fallback Ciphers • Retry Delay (ms) • Verbose Logging • Line Ending Style (CRLF or LF) • Device Type (generic, Cisco IOS, Aruba OS/AP, Juniper, HP ProCurve, Dell PowerConnect, MikroTik) |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. For the System Information resource, the output JSON contains:
raw: Raw command output string.lines: Array of non-empty lines from the output.wordCount: Number of words in the output.stderr: Standard error output (if any).exitCode: Exit code of the executed command.parseOutput: The parsing mode used.- Additional fields depending on the command executed, e.g., device type.
The output format depends on the selected parsing option (smart auto-detect, JSON only, table, raw text, or none).
No binary data is produced by this operation.
Dependencies
- Requires an SSH server accessible from the n8n instance.
- Needs either stored SSH credentials (recommended) or dynamic SSH parameters provided at runtime.
- Uses the
node-sshlibrary for SSH connections. - Optional verbose logging can be enabled for debugging.
- No external API keys are required beyond SSH authentication credentials.
Troubleshooting
- Connection failures: Ensure SSH credentials or dynamic parameters are correct and the target host is reachable on the specified port.
- Invalid host format: Hostnames must contain only letters, numbers, dots, and hyphens.
- Port validation: Ports must be between 1 and 65535.
- Command timeout: If commands take longer than the configured timeout, increase the "Command Timeout" setting.
- Parsing errors: If output parsing fails, try switching to "Raw Text" or "No Parsing" modes.
- Permission issues: Make sure the SSH user has permission to execute the requested commands.
- Continue on Error: Enable this option to allow processing of remaining items even if some fail.
- Verbose logging: Enable to get detailed logs for connection and command execution troubleshooting.
Common error messages include:
- "SSH connection failed": Check network connectivity and credentials.
- "Command cannot be empty": Provide a valid command.
- "Potentially dangerous command detected": Node blocks certain destructive commands for safety.
- "Dynamic host and username are required": Required parameters missing in dynamic mode.
Links and References
- SSH Nexus GitHub Repository (if available) (hypothetical)
- Node-SSH npm package
- n8n Documentation on Creating Custom Nodes
- Linux Commands Reference
If you want me to analyze other resources or operations, or provide more details, please let me know!