Overview
This node, named "Net Devices," allows managing network devices via SSH by executing various operations such as rebooting the device, sending commands, saving configurations, and retrieving running configurations. The "Reboot Device" operation specifically sends a reboot command to the target network device.
Typical use cases include automating network device maintenance tasks like scheduled reboots, configuration backups, or applying changes remotely without manual SSH login. For example, a network administrator can automate device reboots after firmware updates or configuration changes using this node in an n8n workflow.
Properties
| Name | Meaning |
|---|---|
| Advanced Options | Collection of optional settings to control connection and command execution behavior: |
| - Auto Disconnect | Whether to automatically disconnect from the device after executing the command (default: true) |
| - Command Retry Count | Number of retry attempts if a command fails (1 to 5, default: 2) |
| - Command Timeout | Timeout in seconds for command execution (2 to 300, default: 10) |
| - Connection Pooling | Enable connection pooling for better performance (default: false) |
| - Connection Retry Count | Number of retry attempts if connection fails (1 to 10, default: 3) |
| - Connection Timeout | Timeout in seconds for establishing connection (3 to 300, default: 15) |
| - Fail on Error | Whether to fail the entire workflow on command errors (default: true) |
| - Fast Mode | Enable fast mode that skips setup steps for simple commands (default: false) |
| - Retry Delay | Delay in seconds between retry attempts (1 to 60, default: 2) |
| - Reuse Connection | Whether to reuse existing connections when possible (default: false) |
Output
The node outputs JSON data with the following structure:
success(boolean): Indicates whether the operation succeeded.command(string): The executed command name, e.g.,"rebootDevice".output(string): The textual output or response from the device after executing the command.deviceType(string): The type/model of the network device.host(string): The hostname or IP address of the device.timestamp(ISO string): The timestamp when the command was executed.executionTime(number): Time taken to execute the command in milliseconds.connectionRetries(number): Number of connection retry attempts configured.commandRetries(number): Number of command retry attempts configured.error(string, optional): Present if the command failed, describing the error message.
If the command fails but failOnError is set to false, the node returns an object indicating failure without throwing an error.
The node does not output binary data.
Dependencies
- Requires an API key credential to authenticate and connect to the network device over SSH.
- Supports authentication via password or private key with optional passphrase.
- Supports jump host (bastion) configuration for connecting through intermediate hosts.
- Uses internal utilities for SSH connection handling and command execution.
- No additional external services are required beyond the network device accessible via SSH.
Troubleshooting
- Connection failures: If the node cannot connect to the device, it retries based on the configured connection retry count and delay. Common causes include incorrect host/IP, wrong credentials, firewall blocking SSH, or network issues.
- Command timeouts: Commands have configurable timeouts; if a command takes longer than the timeout, it will fail. Increase the command timeout if needed.
- Authentication errors: Ensure correct credentials are provided, including private key and passphrase if used.
- Fail on error: If enabled, any command failure stops the workflow. Disable this option to continue workflows despite errors.
- Retry delays and counts: Adjust these to handle intermittent network or device responsiveness issues.
- Fast mode: Skips some setup steps; disable if commands require full session initialization.
- Reuse connection: Enabling this may improve performance but could cause issues if the device closes sessions unexpectedly.
Common error messages:
"Failed to connect to device ... after X attempts."— Check connectivity and credentials."Command timeout after X seconds"— Increase command timeout or check device responsiveness."Command execution failed after X attempts"— Review command syntax and device state.