SSH Nexus
Actions22
- Command Execution Actions
- File Operations Actions
- Network Device Actions
- System Information Actions
- Connection Health Actions
Overview
This node enables automated SSH interactions with network devices to perform various operations, including backing up device configurations. Specifically, the 💾 Backup Configuration operation connects to a network device via SSH and retrieves its configuration for backup purposes. It supports different device types (e.g., Cisco IOS, Juniper, Aruba) and can handle device-specific command prompts and output formats.
Typical use cases include:
- Regularly backing up running or startup configurations of routers, switches, and other network equipment.
- Automating configuration archival as part of network management workflows.
- Integrating configuration backups into broader IT automation pipelines.
For example, a network engineer could schedule this node to connect nightly to all critical Cisco switches, retrieve their running configs, and store them centrally for compliance and disaster recovery.
Properties
| Name | Meaning |
|---|---|
| Configuration Mode | 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), used in Dynamic Parameters mode. |
| 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). |
| Configuration Type | Type of configuration to retrieve: - Running Configuration: Current active configuration. - Startup Configuration: Configuration used at boot. |
| Return Type | How to return the configuration: - Return Config as Text: Returns configuration as text in the output. - Binary File: Returns configuration as a binary file. |
| Advanced Options | Collection of advanced settings: - Command Timeout (ms): Max wait time for commands. - Output Parsing: How to parse command output (smart, JSON, table, raw, none). - Continue on Error: Whether to continue on errors. - Cipher Override: Select cipher algorithms. - Try Fallback Ciphers: Automatically try alternative ciphers. - Retry Delay (ms): Delay between retries. - Verbose Logging: Enable detailed debug logs. - Line Ending Style: CRLF (Windows) or LF (Unix) line endings. - Device Type: Select device type for optimized handling (generic, Cisco IOS, Aruba OS/AP, Juniper, HP ProCurve, Dell PowerConnect, MikroTik). |
Output
The node outputs an array of items, each containing a json property with the following structure for the backup configuration operation:
raw: The raw configuration text retrieved from the device.lines: Array of non-empty lines from the configuration.wordCount: Number of words in the configuration.stderr: Any error output from the SSH command (usually empty on success).exitCode: Exit code of the SSH command (0 indicates success).deviceType: The type of network device queried.parseOutput: The parsing mode used for the output (e.g., smart, json, raw).- If "Binary File" return type is selected, the configuration is returned as a binary file in the output's binary data field instead of plain text.
This structured output allows downstream nodes to process, store, or analyze the backed-up configuration easily.
Dependencies
- Requires an SSH server accessible on the target network device.
- Needs either stored SSH credentials or dynamic SSH connection parameters.
- Uses the
node-sshlibrary for SSH connections. - Relies on device-specific command sets and prompt handling logic embedded in the node.
- For secure operation, users should configure appropriate SSH credentials within n8n or provide valid dynamic parameters.
- Optional verbose logging and cipher selection require proper configuration to match device capabilities.
Troubleshooting
- Connection Failures: May occur due to incorrect host, port, username, or authentication details. Verify credentials and network reachability.
- Invalid Host Format: Hostnames must only contain letters, numbers, dots, and hyphens.
- Port Number Errors: Ports must be between 1 and 65535.
- Timeouts: Increase the command timeout in advanced options if devices respond slowly.
- Cipher Mismatches: Some devices may require legacy or specific ciphers; use the cipher override option or enable fallback ciphers.
- Parsing Issues: If output parsing fails, try changing the output parsing mode (e.g., raw or none).
- Permission Denied: Ensure SSH user has rights to execute commands and read configurations.
- Error Messages: The node throws descriptive errors for missing required parameters or invalid inputs, e.g., missing dynamic host/username or empty configuration commands.
- Continue on Error: Enable this option to allow processing multiple items even if some fail.