dartssh2_plus 3.0.0 copy "dartssh2_plus: ^3.0.0" to clipboard
dartssh2_plus: ^3.0.0 copied to clipboard

SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.

example/example.dart

import 'dart:convert';
import 'dart:io';

import 'package:dartssh2_plus/dartssh2.dart';

void main(List<String> args) async {
  final socket = await SSHSocket.connect('localhost', 22);

  final client = SSHClient(
    socket,
    username: 'root',
    onPasswordRequest: () {
      stdout.write('Password: ');
      stdin.echoMode = false;
      return stdin.readLineSync() ?? exit(1);
    },
  );

  final uptime = await client.run('uptime');
  print(utf8.decode(uptime));

  client.close();
  await client.done;
}
0
likes
120
points
334
downloads

Publisher

verified publisheriothub.cloud

Weekly Downloads

SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

asn1lib, convert, meta, pinenacl, pointycastle

More

Packages that depend on dartssh2_plus