SSH Nexus

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

Overview

The node "SSH Nexus" provides advanced SSH automation capabilities, including specialized support for network devices such as Cisco IOS, Aruba OS, Juniper, and others. The Network Device - 📋 Get Device Info operation connects to a specified network device via SSH and retrieves detailed system information like device version, model, and other system details.

This operation is beneficial in scenarios where network administrators or automation engineers need to programmatically gather device metadata for inventory management, compliance auditing, or troubleshooting. For example, it can be used to automatically collect firmware versions from multiple switches or routers before performing upgrades or configuration changes.

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 of the network device (required if using Dynamic Parameters mode). Supports expressions and environment variables.
Dynamic Port SSH port number (default 22) for connecting to the device (used in Dynamic Parameters mode).
Dynamic Username Username for SSH login (required if using Dynamic Parameters mode). Supports expressions and environment variables.
Dynamic Password Password for SSH login (optional if using password authentication). Supports expressions and environment variables.
Dynamic Private Key Private key content for SSH authentication (optional alternative to password). Supports expressions and environment variables.
Advanced Options Collection of additional settings:
- Command Timeout (ms): Max time to wait for command completion (default 30000 ms).
- Output Parsing: How to parse command output (smart, JSON, table, raw, none).
- Continue on Error: Whether to continue processing remaining items if some commands fail.
- Cipher Override: Override cipher selection for SSH connection.
- Try Fallback Ciphers: Automatically try alternative ciphers if primary ones fail.
- Retry Delay (ms): Delay between connection retry attempts.
- Verbose Logging: Enable detailed debug logging.
- Line Ending Style: Line ending style for command execution (CRLF or LF).
- Device Type: Select device type for optimized command handling (generic, Cisco IOS, Aruba OS, Juniper, etc.).

Output

The output JSON object contains parsed information about the network device's system info retrieved via SSH. The structure includes:

  • raw: Raw text output from the device.
  • lines: Array of non-empty lines from the output.
  • wordCount: Number of words in the output.
  • stderr: Any error output captured during command execution (usually empty).
  • exitCode: Exit code of the executed command (0 indicates success).
  • deviceType: The type of network device queried.
  • parseOutput: The parsing mode used (e.g., smart, json, table).
  • Additional fields depend on the parsing mode and device response.

If binary data output is supported by other operations, it would represent file contents or backups; however, this specific operation outputs textual device info only.

Dependencies

  • Requires an SSH server running on the target network device.
  • Needs either stored SSH credentials or dynamic SSH connection parameters.
  • Uses the node-ssh library for SSH connections.
  • Relies on internal utilities for parsing SSH output and managing device-specific command prompts.
  • No external API keys are required beyond SSH authentication credentials.
  • Recommended to configure SSH credentials securely within n8n or provide dynamic parameters carefully.

Troubleshooting

  • Invalid host format error: Ensure the hostname/IP contains only letters, numbers, dots, and hyphens.
  • Port number out of range: Must be between 1 and 65535.
  • Missing credentials or parameters: When using credentials mode, stored SSH credentials must be configured. When using dynamic mode, host and username are mandatory.
  • Connection timeout or failure: Check network connectivity, SSH service availability, and firewall rules.
  • Cipher negotiation errors: Use advanced options to override cipher selection or enable fallback ciphers.
  • Parsing issues: If output parsing fails, try changing the "Output Parsing" option to raw or none.
  • Command execution errors: May indicate insufficient permissions or unsupported commands on the device.
  • Enable mode password prompt failures: If device requires privileged mode, ensure the enable password is correctly set in credentials or parameters.

Links and References

Discussion