dartssh2 2.4.2 copy "dartssh2: ^2.4.2" to clipboard
dartssh2: ^2.4.2 copied to clipboard

outdated

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/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;
}
122
likes
0
pub points
94%
popularity

Publisher

verified publisherterminal.studio

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, asn1lib, convert, dart_console, http, meta, pinenacl, pointycastle, validators

More

Packages that depend on dartssh2