Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/src/ssh_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ class SSHClient {
/// Allow to disable hostkey verification, which can be slow in debug mode.
final bool disableHostkeyVerification;

/// Identification string advertised during the SSH version exchange (the part
/// after `SSH-2.0-`). Defaults to `'DartSSH_2.0'`
final String ident;

/// A [Future] that completes when the transport is closed, or when an error
/// occurs. After this [Future] completes, [isClosed] will be true and no more
/// data can be sent or received.
Expand All @@ -156,6 +160,7 @@ class SSHClient {
this.onAuthenticated,
this.keepAliveInterval = const Duration(seconds: 10),
this.disableHostkeyVerification = false,
this.ident = 'DartSSH_2.0',
}) {
_transport = SSHTransport(
socket,
Expand All @@ -167,6 +172,7 @@ class SSHClient {
onReady: _handleTransportReady,
onPacket: _handlePacket,
disableHostkeyVerification: disableHostkeyVerification,
version: ident,
);

_transport.done.then(
Expand Down