Overview
The "Net Devices" node enables managing network devices via SSH by sending commands and configurations, retrieving running configurations, rebooting devices, and saving configurations. It is particularly useful for network administrators who want to automate device management tasks within n8n workflows.
For the Send Command operation, the node sends a specified command string to a network device and returns the response. This can be used to query device status, retrieve version info, or execute any supported CLI command on the device.
Practical examples:
- Running
show versionto get device firmware details. - Executing
show interfacesto check interface statuses. - Sending custom diagnostic commands to troubleshoot network issues.
Properties
| Name | Meaning |
|---|---|
| Command | The command string to send to the network device (e.g., show version). |
| Advanced Options | A collection of optional settings to control connection and command execution behavior: |
| - Auto Disconnect | Whether to automatically disconnect from the device after executing the command (true/false). |
| - Command Retry Count | Number of retry attempts if the command execution fails (1 to 5). |
| - Command Timeout | Timeout in seconds for command execution (2 to 300 seconds). |
| - Connection Pooling | Enable connection pooling for better performance (true/false). |
| - Connection Retry Count | Number of retry attempts if connection to the device fails (1 to 10). |
| - Connection Timeout | Timeout in seconds for establishing the connection (3 to 300 seconds). |
| - Fail on Error | Whether to fail the entire workflow if the command errors out (true/false). |
| - Fast Mode | Enables fast mode that skips setup steps for simple commands (true/false). |
| - Retry Delay | Delay in seconds between retry attempts (1 to 60 seconds). |
| - Reuse Connection | Whether to reuse existing connections when possible (true/false). |
Output
The node outputs an array of JSON objects, each representing the result of executing the command on a device. Each output object contains:
success(boolean): Indicates if the command executed successfully.command(string): The command that was sent.output(string): The raw textual response returned by the device.deviceType(string): The type/model of the network device.host(string): The hostname or IP address of the device.timestamp(ISO string): When the command was executed.executionTime(number): Time taken in milliseconds to execute the command.connectionRetries(number): Number of connection retry attempts made.commandRetries(number): Number of command retry attempts made.error(string, optional): Error message if the command failed.
The node does not output binary data.
Dependencies
- Requires an API key credential configured with access to the target network devices.
- The node uses SSH connections to communicate with devices.
- Supports authentication via password or private key with optional passphrase.
- Supports jump host (bastion) configuration for accessing devices behind firewalls.
- No additional external services are required beyond the network device itself.
Troubleshooting
- Connection failures: If the node cannot connect to the device, verify network reachability, SSH credentials, and firewall rules. Adjust connection retry count and timeout settings as needed.
- Command timeouts: Commands taking longer than the configured timeout will fail. Increase the command timeout property if necessary.
- Authentication errors: Ensure correct username, password/private key, and passphrase are provided.
- Fail on error: If enabled, any command failure will stop the workflow. Disable this option to continue processing other items despite errors.
- Fast mode issues: Some complex commands may require setup steps; disable fast mode if commands fail unexpectedly.
- Connection reuse: If enabled, stale connections might cause errors; try disabling reuse if encountering unexpected disconnections.
Common error messages include:
Failed to connect to device ... after X attempts: Indicates persistent connection issues.Command timeout after X seconds: Command did not complete in time.Command execution failed after X attempts: Command repeatedly failed; check command syntax and device state.