ssh_exec
Execute shell commands on a remote host via SSH and retrieve their output, using SSH key or password authentication with configurable timeout.
Instructions
在远程主机上执行 shell 命令并返回输出。
host 两种写法(由系统 ssh 解析 ~/.ssh/config):
别名:如 moon / thor / J30V2-oldest
user@ip:如 diff@10.176.224.12 认证:默认使用 ~/.ssh 下的密钥(含 config 中各 Host 的 IdentityFile); 传入 password 则改用密码认证(sshpass 实现,密码仅经环境变量传递)。 timeout 为远程命令执行超时(秒,默认 60)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| command | Yes | ||
| timeout | No | ||
| password | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |