SSH Nexus
Actions22
- Command Execution Actions
- File Operations Actions
- Network Device Actions
- System Information Actions
- Connection Health Actions
Overview
The node "SSH Nexus" provides advanced SSH automation capabilities, including connection health monitoring, command execution, file operations, network device management, and system information retrieval. Specifically, for the Connection Health resource with the Latency Test operation, it measures the latency and jitter of an SSH connection by executing multiple simple commands and timing their responses.
This node is beneficial in scenarios where you need to:
- Monitor the responsiveness and quality of SSH connections to remote servers or network devices.
- Diagnose network latency issues affecting SSH sessions.
- Automate periodic latency testing as part of network health checks.
Practical example:
You can use this node to run a latency test on your critical servers to ensure they respond within acceptable time frames, helping detect network degradation early.
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 for SSH connection (required if using Dynamic Parameters mode). Supports expressions and environment variables. |
| Dynamic Port | SSH port number (default 22) when using Dynamic Parameters mode. 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 (optional, supports expressions and environment variables). |
| Dynamic Private Key | Private key content for SSH authentication (optional, supports expressions and environment variables). |
| Advanced Options | Collection of additional settings: - Command Timeout (ms): Max wait time 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 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: CR+LF (Windows) or LF (Unix) line endings for command execution. - Device Type: Select network device type for optimized handling (generic, Cisco IOS, Aruba OS/AP, Juniper, HP ProCurve, Dell PowerConnect, MikroTik). |
Output
The output JSON object for the Latency Test operation contains the following fields:
averageLatency: Average latency in milliseconds over successful iterations.minLatency: Minimum latency recorded.maxLatency: Maximum latency recorded.jitter: Difference between max and min latency, indicating variability.packetLoss: Percentage of failed ping attempts (out of 10).iterations: Number of latency measurement attempts (fixed at 10).rawLatencies: Array of individual latency measurements (in ms), with-1indicating failure.quality: Qualitative assessment of connection quality based on jitter (excellent,good,fair,poor).timestamp: ISO timestamp of when the test was performed.connectionInfo: Object containing connection details such as host, port, and username.
This structured output allows easy integration into monitoring dashboards or further workflow logic.
Dependencies
- Requires an active SSH server accessible via provided credentials or dynamic parameters.
- Uses the
node-sshlibrary for SSH connections. - Requires proper SSH credentials or dynamic parameters configured in n8n.
- No external API keys are needed beyond SSH authentication.
- Optional verbose logging can be enabled for troubleshooting.
Troubleshooting
Common Issues
- Invalid host format: The dynamic host must only contain letters, numbers, dots, and hyphens.
- Port out of range: SSH port must be between 1 and 65535.
- Missing credentials: When using credentials mode, stored SSH credentials must be provided.
- Connection failures: Could be due to network issues, wrong credentials, or unsupported ciphers.
- Command timeout: If commands take longer than the specified timeout, consider increasing the timeout value.
- Parsing errors: Output parsing may fail if the output format does not match the selected parsing mode.
Common Error Messages
"SSH credentials are required when using credentials mode": Provide valid SSH credentials."Invalid host format: ...": Correct the hostname to allowed characters."Invalid port number: ...": Use a valid port number."Potentially dangerous command detected: ...": Node blocks dangerous commands for safety."Operation failed for item ...": Indicates failure during execution; check error details and logs."File upload/download failed": Check file paths, permissions, and binary data correctness.
Resolution Tips
- Verify SSH connectivity outside n8n using the same credentials.
- Enable verbose logging to get detailed connection and command execution info.
- Adjust cipher settings if connection handshake fails.
- Validate all input parameters carefully.
Links and References
- node-ssh GitHub Repository – underlying SSH client library used.
- [SSH Nexus Documentation (if available)] – For detailed usage and examples.
- n8n Documentation – General guidance on creating and using custom nodes.
- SSH Protocol Overview – Background on SSH protocol and ciphers.
Summary
This node's Connection Health > Latency Test operation performs multiple quick SSH command executions to measure latency and jitter, providing quantitative metrics about SSH connection performance. It supports flexible configuration modes, advanced options for fine-tuning, and outputs detailed structured results suitable for monitoring and diagnostics.