forwardLocal method

Future<SSHForwardChannel> forwardLocal(
  1. String remoteHost,
  2. int remotePort, {
  3. String localHost = 'localhost',
  4. int localPort = 0,
})

Forward connections to a localHost:localPort to remoteHost:remotePort localHost and localPort are only required by the protocol and do not need to be specified in most cases.

Implementation

Future<SSHForwardChannel> forwardLocal(
  String remoteHost,
  int remotePort, {
  String localHost = 'localhost',
  int localPort = 0,
}) async {
  await _authenticated.future;
  final channelController = await _openForwardLocalChannel(
    localHost,
    localPort,
    remoteHost,
    remotePort,
  );
  return SSHForwardChannel(channelController.channel);
}