ssh_exec
Execute a single command on a remote host over SSH using password or key authentication, returning stdout, stderr, and exit code.
Instructions
Execute a single command via SSH (uses paramiko, no sshpass dependency). host: target IP or hostname username: SSH username password: SSH password (leave empty if using key) key_file: path to private key file (leave empty if using password) command: shell command to execute port: SSH port (default 22) timeout: command timeout in seconds (default 60) Returns: stdout, stderr, return_code (or error if connection/auth failed)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| port | No | ||
| command | No | id | |
| timeout | No | ||
| key_file | No | ||
| password | No | ||
| username | Yes |