privileged-command
Run shell commands with sudo privileges through an approval gate, securely piping the password via stdin. Handles single-line commands; upload scripts for multi-line execution.
Instructions
Execute a command with sudo elevation. Goes through the approval gate; approvalPolicy on the profile decides whether that is a prompt, an automatic allow, or a refusal. The sudo password is piped via stdin (never visible in process list). Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command to execute with sudo | |
| profile | No | Profile name |