ssh_multi_exec
Run a command on multiple remote hosts simultaneously and get results per host, reducing repeated SSH calls. Ideal for applying the same operation across servers in one step.
Instructions
Execute a command on multiple remote hosts in parallel. Returns results per host. Use this instead of calling ssh_exec multiple times — it's faster and shows results side by side. Subject to SSH_MCP_COMMAND_WHITELIST / SSH_MCP_COMMAND_BLACKLIST if configured (policy is checked once before fan-out).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | SSH port (default: 22) | |
| hosts | Yes | List of SSH hostnames or IPs | |
| command | Yes | Shell command to execute on all hosts | |
| timeout | No | Command timeout in milliseconds (default: 30000) | |
| username | No | SSH username (default: current user) | |
| credential_id | No | Alias of an SSH password configured only on the MCP server (for example, ssh1 resolves to SSH_CREDENTIAL_SSH1). Never pass a real password here. | |
| privateKeyPath | No | Path to SSH private key |