netmiko.send_show_command
Securely connect to a network device via SSH and execute a single show command with syntax validation per platform, returning the output.
Instructions
Connect to one network device over SSH and run a single show command.
IMPORTANT: If the user message involves network devices, call netmiko.get_metadata FIRST.
The command is validated against the operator's allow/deny list before execution. A rejection is NOT a bug and NOT something to work around: report it to the user and say which command was refused. Do not retry with an abbreviation — abbreviations are covered by the deny list, not by the allow list.
SYNTAX IS PER-PLATFORM. Netmiko drives 177 base device_types (416 with variants)
from 102 vendors and their CLIs are NOT interchangeable. Check the device's
device_type with netmiko.list_devices first and use that platform's syntax:
Cisco IOS/Arista/Juniper use show ..., Huawei VRP and HPE Comware use
display ..., MikroTik RouterOS uses /system resource print, F5 tmsh uses
list/show with its own grammar. Never translate a command from one family
to another by analogy, and never probe variants to see which one is accepted —
each attempt is audited and may be denied for a different reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Full, un-abbreviated CLI command, e.g. 'show ip interface brief'. | |
| device_name | Yes | Exact device name from the inventory (netmiko.list_devices). | |
| save_output | No | Always write the output to disk and return the filename instead of the content. Useful when you will refer back to it several times. | |
| use_textfsm | No | Parse the output into structured JSON via ntc-templates. Falls back to raw text when no template exists. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |