execute_command
Execute system commands locally or on remote hosts via SSH, with support for persistent sessions and custom environment variables. Simplify command execution across multiple systems.
Instructions
Execute commands on remote hosts or locally (This tool can be used for both remote hosts and the current machine)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
command | Yes | Command to execute. Before running commands, it's best to determine the system type (Mac, Linux, etc.) | |
env | No | Environment variables | |
host | No | Host to connect to (optional, if not provided the command will be executed locally) | |
session | No | Session name, defaults to 'default'. The same session name will reuse the same terminal environment for 20 minutes, which is useful for operations requiring specific environments like conda. | default |
username | No | Username for SSH connection (required when host is specified) |