run_ssh_command
Execute pre-approved SSH commands on remote Linux servers using command templates for tasks like checking disk usage, monitoring services, viewing logs, and listing processes.
Instructions
Execute a pre-approved command template on a target host.
Use list_templates to discover available template_ids. Examples:
disk_usage: run df -h (no params needed)
service_status: check a systemd service (params: {"service": "docker"})
list_processes: show top processes by memory (no params needed)
tail_log: tail a log file (params: {"lines": "100", "log_path": "/var/log/syslog"})
Only commands from the template registry are allowed. Parameters are validated against per-template regex rules. Output is automatically redacted for secrets.
Pass session_id from ssh_connect to reuse a persistent connection.
Risk level: medium (requires user confirmation in VS Code).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host_id | Yes | ||
| template_id | Yes | ||
| params | No | ||
| session_id | No |