remotePortForward

suspend fun remotePortForward(remoteBindAddress: String, remoteBindPort: Int, localHost: String, localPort: Int): PortForwarder?(source)

Start remote port forwarding (RFC 4254 section 7.1).

Asks the SSH server to listen on remoteBindAddress:remoteBindPort and forwards each connection back to localHost:localPort on this machine.

Return

PortForwarder handle, or null if the server rejected the request

Parameters

remoteBindAddress

Address for the server to bind

remoteBindPort

Port for the server to bind (0 for automatic)

localHost

Local host to forward to

localPort

Local port to forward to