ssh_connect
Establish a secure SSH connection to a remote server, returning a session ID for executing commands and managing files via SFTP.
Instructions
Connect to a remote SSH server. Returns a session ID to be used for subsequent commands and files. If neither password nor privateKey are specified, this tool will attempt to use default keys in your ~/.ssh directory. If a file path is provided in privateKey, it will be loaded from disk.
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 host name or IP address | |
| port | No | Port number (default: 22) | |
| username | Yes | Username for connection | |
| password | No | Password (if using password authentication) | |
| pw | No | Alias for password (helpful fallback for small LLMs) | |
| privateKey | No | Raw private key content OR a local path (e.g. '~/.ssh/id_rsa') to the key | |
| passphrase | No | Passphrase to decrypt the private key (if encrypted) | |
| readyTimeout | No | Connection timeout in milliseconds (default: 20000) |