Properties
Called when authentication skips a key because of policy. Must return promptly.
Whether to automatically disconnect the SSH connection when the last channel is closed.
Client version string sent during SSH handshake.
Maximum wait for sending the final disconnect packet during automatic last-channel shutdown or a key-exchange failure. Defaults to 5 seconds; 0 waits until the write completes or the connection is closed explicitly. Explicit SshClient.disconnect always aborts outstanding writes immediately.
Enable zlib compression. When true, the client offers zlib@openssh.com,zlib,none; when false, only none.
Environment variables sent before each session starts, including SFTP. Servers may ignore variables not allowed by their policy (OpenSSH AcceptEnv). Names and values use UTF-8 and must not contain NUL. Only supplied variables are sent.
Maximum wait for initial key exchange and service negotiation after version exchange, including host-key verification. Does not limit TCP connection, version exchange, authentication, or reads from an established session.
Hostname for TCP connections. Used with default KtorTcpTransport. Ignored if transportFactory is set explicitly.
Timeout for processing a server's host-key update, including proof requests and verifier persistence callbacks. Defaults to 30 seconds; 0 waits until completion or connection shutdown. Failed or timed-out updates do not replace trusted keys unless their proofs have been verified.
Host key verifier.
IP version preference for the default TCP transport. Ignored if transportFactory is set explicitly.
Send an SSH_MSG_IGNORE heartbeat every N milliseconds to keep the connection alive across NAT/VPN/firewall idle timeouts.
Quantize outbound keystroke packet timing to this interval (milliseconds) to mask inter-keystroke timing patterns. Requires a PTY session and server support for ping@openssh.com. Set to 0 to disable.
Port for TCP connections. Used with default KtorTcpTransport. Ignored if transportFactory is set explicitly.
When true, prefer password over keyboard-interactive when both are available. By default, keyboard-interactive is preferred.
Null preserves the historical authentication behavior for existing callers.
Re-key after this many wire bytes (sent or received). Default: 1 GB.
Re-key after this many milliseconds. Default: 1 hour.
Receive window, in bytes, for shells, commands and manually opened subsystems. SFTP channels opened by SshClient.openSftp use sftpWindowSize. A channel moves at most one window of data per network round trip, so a larger window speeds up bulk transfers on slower links. Each channel may buffer up to this much unread data. Default: 2 MiB. Reduce this for sessions with tighter memory limits.
Default response timeout for ordinary requests on clients opened by SshClient.openSftp. Defaults to 30 seconds; 0 waits until completion, disconnect, or coroutine cancellation. Excludes SFTP version negotiation and request writes. SftpClient.copyData uses its per-call timeout instead.
Receive window, in bytes, for channels opened by SshClient.openSftp. Default: 8 MiB, to sustain bulk downloads on higher-latency links. Each channel may buffer up to this much unread data; reduce this for tighter memory limits.
Custom transport factory. If not set, uses KtorTcpTransportFactory with host, port, and ipVersion.
Functions
Apply a freshly resolved SshCryptoPolicy before any explicit preference reordering. Resolve after installing platform crypto providers. The policy controls all algorithm categories, including public-key authentication, and enforces RSA/DH minimum key sizes. See SshCryptoPolicy for presets, custom expression syntax, and capability warnings.
Prepend certificate counterparts of configured host key algorithms at build time. Assignment order does not matter. Raw keys remain as fallback; CA trust must be configured in hostKeyVerifier. Calling with false disables automatic additions.