invoke

operator fun invoke(host: String, hostKeyVerifier: HostKeyVerifier, port: Int = 22, clientVersion: String = "SSH-2.0-CBSSH_1.0"): SshClient(source)

Create an SshClient for TCP connection to the specified host.

Parameters

host

SSH server hostname

port

SSH server port (default 22)

clientVersion

Client version string for the SSH handshake


operator fun invoke(config: SshClientConfig): SshClient(source)

Create an SshClient from a configuration.


operator fun invoke(transportFactory: TransportFactory, hostKeyVerifier: HostKeyVerifier, clientVersion: String = "SSH-2.0-CBSSH_1.0"): SshClient(source)

Create an SshClient with a custom transport factory.

Parameters

transportFactory

Factory to create the transport

clientVersion

Client version string for the SSH handshake