exec_shell
Execute commands through an interactive shell for bastion host access. Specify target server by alias or host, or omit when only one connection is active.
Instructions
通过交互式 shell 模式执行命令(用于堡垒机穿透等不支持 exec 的场景)。必须指定目标服务器:使用 alias(推荐)或 host。只有一个活跃连接时可省略目标。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | 要执行的命令 | |
| alias | No | 服务器别名(推荐) | |
| host | No | 服务器地址(多个活跃连接时必须指定 alias 或 host,单连接时可省略) | |
| port | No | SSH 端口(可选) | |
| username | No | 用户名(可选,配合 host 使用) | |
| timeout | No | 命令超时时间(毫秒,最小 1000) | |
| promptPattern | No | 自定义 shell 提示符正则表达式(可选,用于识别命令执行完成) | |
| confirmationToken | No | 危险命令确认 token | |
| targetConfirmationToken | No | 服务器切换确认 token |