ssh_execute_command
Execute commands on remote systems via SSH. Supports sudo and auto-injects credentials from the keyring when stored.
Instructions
Execute a command on a remote system via SSH. If credentials were stored with credentials add, username and password are auto-injected from the keyring — omit them. If authentication fails with 'No credentials found', run homelab-mcp credentials add <hostname> <username> in the terminal or call list_keyring_credentials to see what is already stored.
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": {
"hostname": "<hostname>",
"command": "<command>"
},
"name": "ssh_execute_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | SSH port (default: 22) | |
| sudo | No | Execute command with sudo privileges | |
| command | Yes | Command to execute on the remote system | |
| hostname | Yes | Hostname or IP address | |
| password | No | SSH password. Omit if credentials were stored with `credentials add` — they are auto-injected. | |
| username | No | SSH username. Omit if credentials were stored with `credentials add` — they are auto-injected. |