ssh_execute_command
Execute a command on a remote system via SSH with auto-injected credentials. Supports sudo access and custom port.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostname | Yes | Hostname or IP address | |
| username | No | SSH username. Omit if credentials were stored with `credentials add` — they are auto-injected. | |
| password | No | SSH password. Omit if credentials were stored with `credentials add` — they are auto-injected. | |
| command | Yes | Command to execute on the remote system | |
| sudo | No | Execute command with sudo privileges | |
| port | No | SSH port (default: 22) |