Start a long-running command as another Linux user
exec_as_startRun a command as a specified Linux user via sudo, returning a job ID for status tracking and cancellation.
Instructions
Start a sudo -iu command and return immediately with a jobId. Read it with exec_status; stop it with exec_cancel. The optional sudoPassword is piped through stdin and never logged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connectionName": "<connectionName>",
"runAs": "<runAs>",
"command": "<command>"
},
"name": "exec_as_start"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional remote working directory. | |
| runAs | Yes | Target Linux username, e.g. 'appuser'. Strictly validated. | |
| command | Yes | Command to run as the target user. | |
| timeoutMs | No | ||
| sudoPassword | No | Optional sudo password. Piped via stdin; never logged or returned. | |
| connectionName | Yes | ||
| maxBufferBytes | No |