Execute a shell command over SSH
execExecute shell commands on remote servers via SSH, capturing stdout/stderr/exit code, with automatic blocking of dangerous operations unless confirmed.
Instructions
Runs a single shell command on the remote server over SSH and returns stdout/stderr/exit code. Use this for anything that doesn't fit one of the deploy_* recipe tools. Dangerous commands (rm -rf, reboot, mkfs, etc.) are blocked unless confirmed=true — if blocked, explain the risk to the user in plain language, get their explicit OK, then retry with confirmed: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Server IP address or hostname, e.g. 168.119.45.12 | |
| port | No | SSH port, defaults to 22 | |
| command | Yes | The shell command to run, e.g. 'systemctl status nginx' | |
| username | Yes | SSH username, e.g. root or deploy | |
| confirmed | No | Set to true only after the user has explicitly approved a flagged dangerous command | |
| passphrase | No | Passphrase for the private key, if it has one | |
| privateKeyPath | Yes | Path to the private key on THIS machine, e.g. "~/.ssh/id_ed25519" |