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