Open SSH Session
ssh_open_sessionEstablish an authenticated SSH session to a remote host using password, key, or agent authentication.
Instructions
Opens a new SSH session with authentication
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | Authentication method (default: auto) | |
| host | Yes | SSH server hostname or IP | |
| port | No | SSH port (default: 22) | |
| ttlMs | No | Session TTL in milliseconds (default: 900000) | |
| password | No | Password for authentication | |
| useAgent | No | Use SSH agent for authentication | |
| username | Yes | SSH username | |
| passphrase | No | Passphrase for encrypted private key | |
| policyMode | No | Use explain to return the planned connection without opening SSH | |
| privateKey | No | Inline private key content | |
| hostKeyPolicy | No | SSH host key verification policy (default: strict) | |
| knownHostsPath | No | Path to known_hosts file | |
| privateKeyPath | No | Path to private key file | |
| readyTimeoutMs | No | Connection timeout in milliseconds (default: 20000) | |
| expectedHostKeySha256 | No | Pinned SHA-256 host key fingerprint, with or without SHA256: prefix | |
| strictHostKeyChecking | No | Deprecated alias. Prefer hostKeyPolicy. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| username | Yes | ||
| sessionId | Yes | ||
| policyMode | Yes | ||
| expiresInMs | Yes | ||
| wouldConnect | No | ||
| hostKeyPolicy | Yes | ||
| sftpAvailable | Yes |