Actions5
Execute Command List
AI-generatedOverview
This node operation executes multiple SSH commands on a remote network device using a command list. It supports different input formats for commands, including text lists, JSON arrays, and simple arrays. The node allows configuration of SSH connection parameters such as host, port, cipher selection, and advanced security options. It is useful for network administrators who need to automate running multiple commands on devices like switches, routers, or access points, and supports vendor-specific optimizations for devices like Aruba, Cisco, and Juniper.
Use Case Examples
- Running a list of show commands on a Cisco IOS device to gather system status and interface information.
- Executing configuration commands on an Aruba switch using a JSON array of commands with custom wait times between each command.
Properties
| Name | Meaning |
|---|---|
| Host | IPv4/IPv6 address or hostname of the device to connect via SSH. |
| Port | SSH port number of the device, default is 22. |
| Cipher Selection | Select specific cipher or cipher group for the SSH connection to control encryption algorithms. |
| Commands Format | Format of the commands input: text list, JSON array, or simple array. |
| Commands | Commands to execute on the remote device, format depends on Commands Format property. |
| Default Wait Time (ms) | Default time to wait between commands in milliseconds. |
| Advanced Security Options | Options to configure compatibility level, security level, and allowance of legacy algorithms for SSH connection. |
| Connection Options | Various connection parameters such as timeouts, prompts regex, retry settings, logging, terminal type, privilege mode, and device type for vendor-specific optimizations. |
Output
JSON
success- Indicates if the command execution was successful.host- The host address of the device connected to.commandCount- Number of commands executed.results- Array of results for each command executed, including command string and output.cipher- The cipher used for the SSH connection.
Dependencies
- An SSH server on the target device
- An API key credential for SSH authentication (username and password)
Troubleshooting
- Ensure the SSH credentials (username and password) are correctly provided and valid.
- Verify the host IP/hostname and port are reachable and correct.
- If commands fail to execute, check the command syntax and device compatibility.
- If connection fails, try adjusting cipher selection or enabling fallback ciphers.
- Timeouts can be adjusted in connection options to accommodate slow devices or networks.
- Verbose logging can be enabled for detailed debugging information but is not recommended for production use.
Links
- Secure Shell (SSH) - General information about SSH protocol.
- RFC 4253 - SSH Transport Layer Protocol - Technical specification of SSH transport layer.