ssh_run_command
Run shell commands on remote hosts via SSH and get stdout, stderr, and exit code.
Instructions
SSH into a remote host and run an arbitrary shell command. Returns stdout, stderr and the exit code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Remote hostname or IP address | |
| port | No | SSH port (default 22) | |
| command | Yes | Shell command to run on the remote host | |
| password | No | SSH password (if not using a key) | |
| username | Yes | SSH username | |
| passphrase | No | Passphrase for the private key | |
| privateKey | No | PEM-encoded private key content | |
| privateKeyPath | No | Path to private key file (e.g. ~/.ssh/id_rsa) |