SSH Nexus
Actions22
- Command Execution Actions
- File Operations Actions
- Network Device Actions
- System Information Actions
- Connection Health Actions
Overview
This node provides advanced SSH automation capabilities, specifically tailored for network devices such as Cisco IOS, Aruba OS, Juniper, and others. The "Get Startup Config" operation retrieves the startup (boot) configuration of a network device via an SSH connection. This is useful for network administrators who want to audit, backup, or analyze the initial configuration that a device loads on boot.
Typical use cases include:
- Auditing device configurations before changes.
- Backing up startup configurations for disaster recovery.
- Automating compliance checks by extracting startup configs regularly.
- Integrating with other systems for centralized configuration management.
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). Supports expressions and environment variables. |
| Dynamic Username | Username for SSH login (required if using Dynamic Parameters mode). Supports expressions and environment variables. |
| Dynamic Password | Password for SSH login. Supports expressions and environment variables. |
| Dynamic Private Key | Private key content for SSH authentication. Supports expressions and environment variables. |
| Advanced Options | Collection of additional settings: • Command Timeout (ms): Max wait time for command completion. • Output Parsing: How to parse command output (Smart, JSON, Table, Raw, None). • Continue on Error: Whether to continue processing 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 logs. • Line Ending Style: CR+LF (Windows) or LF (Unix) line endings. • Device Type: Select device type for optimized command handling (Generic, Cisco IOS, Aruba OS, Juniper, etc.). |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. For the "Get Startup Config" operation, each output JSON object contains:
raw: The raw text output of the startup configuration retrieved from the device.lines: An array of non-empty lines extracted from the raw output.wordCount: Number of words in the output.stderr: Any error output captured during command execution (usually empty if successful).exitCode: Exit code of the SSH command (0 indicates success).deviceType: The type of network device queried.parseOutput: The parsing mode used (e.g., smart, json, table, raw, none).
If output parsing is enabled, the node attempts to intelligently parse the configuration text into structured data depending on the selected parsing mode. Otherwise, it returns raw text.
No binary data is output for this operation.
Dependencies
- Requires an SSH server running on the target network device.
- Needs either stored SSH credentials or dynamic SSH connection parameters.
- Uses the
node-sshlibrary for SSH connections. - Relies on internal utilities for parsing SSH output and managing device-specific command prompts.
- Optional verbose logging can be enabled for troubleshooting.
- No external API keys are required beyond SSH authentication credentials.
Troubleshooting
- Connection Failures: Ensure the SSH host, port, username, and authentication method are correct. Check network connectivity and firewall rules.
- Invalid Host Format: Hostnames must only contain letters, numbers, dots, and hyphens.
- Port Number Errors: Port must be between 1 and 65535.
- Timeouts: Increase the "Command Timeout" in Advanced Options if commands take longer to execute.
- Parsing Issues: If output parsing fails or produces unexpected results, try changing the "Output Parsing" mode to "Raw Text" or "No Parsing".
- Cipher Mismatch: If SSH connection fails due to cipher issues, try enabling fallback ciphers or manually selecting a compatible cipher in Advanced Options.
- Enable Mode Password: Some devices require entering privileged mode; ensure the enable password is set correctly if needed.
- Line Ending Problems: Incorrect line ending style may cause command execution issues; adjust the "Line Ending Style" accordingly.
- Continue on Error: Enable this option to allow processing multiple items even if some fail.
Common error messages include:
- "SSH credentials are required when using credentials mode": Provide valid stored SSH credentials.
- "Dynamic host and username are required when using dynamic configuration mode": Fill in these fields when not using stored credentials.
- "Potentially dangerous command detected": The node blocks certain destructive commands for safety.
- "Invalid applyMethod": When restoring config, ensure the apply method is either "merge" or "replace".
Links and References
- SSH Nexus Node Documentation
- NodeSSH GitHub Repository
- [Network Device CLI Reference Guides (Cisco, Juniper, Aruba, etc.)]
- SSH Protocol and Cipher Suites