ssh_connect
Establishes a new SSH connection to a remote server, returning a session_id and accepted host key fingerprint while verifying host keys against known_hosts.
Instructions
Create a new SSH connection to a remote server. Returns a session_id and the accepted host key fingerprint. Host keys are checked against known_hosts (default accept-new: remember a new key, reject a changed key). If server is pre-configured via environment variables, this is optional.
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>",
"username": "<username>"
},
"name": "ssh_connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Remote server hostname or IP address | |
| port | No | SSH port (default: 22) | |
| timeout | No | Command execution timeout in ms (default: 30000) | |
| password | No | Password for authentication | |
| username | Yes | SSH username | |
| passphrase | No | Passphrase for encrypted private key | |
| private_key | No | Private key content (PEM format) | |
| connect_timeout | No | Connection timeout in ms (default: 10000) | |
| keepalive_count | No | Max keepalive failures before disconnect (default: 3) | |
| host_fingerprint | No | Required SHA256 host key fingerprint, for example SHA256:abc... | |
| known_hosts_path | No | known_hosts file. Defaults to ~/.ssh/known_hosts | |
| private_key_path | No | Path to private key file | |
| keepalive_interval | No | Keepalive interval in ms (default: 10000, 0 to disable) | |
| strict_host_key_checking | No | Host key policy. accept-new records unseen keys and rejects changed keys. yes rejects unseen keys. no skips known_hosts. |