sftp method

Future<SftpClient> sftp()

Open a new SFTP session. Returns a SftpClient that can be used to interact with the remote side.

Implementation

Future<SftpClient> sftp() async {
  await _authenticated.future;

  final channelController = await _openSessionChannel();
  channelController.sendSubsystem('sftp');

  return SftpClient(
    channelController.channel,
    printDebug: printDebug,
    printTrace: printTrace,
  );
}