Execute Command Async
execute_command_asyncRuns SSH commands asynchronously and returns a command ID, so long-running tasks do not block the server; use companion tools to check status, retrieve output, or interrupt.
Instructions
Execute a command asynchronously without blocking the server.
Returns a command ID that can be used to check status, retrieve output, or interrupt. Useful for long-running commands like 'sleep 60', monitoring tasks, or large operations.
Use with companion tools:
get_command_status(command_id) to check progress and retrieve output
interrupt_command_by_id(command_id) to send Ctrl+C and stop execution
send_input(command_id, text) to provide input to interactive commands
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": {
"host": "<host>",
"command": "<command>"
},
"name": "execute_command_async"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Hostname, IP address, or SSH config alias | |
| port | No | SSH port (optional) | |
| command | Yes | Command to execute | |
| timeout | No | Maximum execution time in seconds (default: 300) | |
| password | No | SSH password (optional) | |
| username | No | SSH username (optional) | |
| key_filename | No | Path to SSH key file (optional) |