dartssh2
4.1.0, released 3 months ago by victorcarreras.dev
SSH and SFTP client written in pure Dart
What it does
Provides an SSH and SFTP client library implemented in pure Dart that supports running remote commands, interactive shells, port forwarding, authentication methods, and file transfers across multiple platforms including the web.
AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to connect to remote servers via SSH or execute commands programmatically from a Dart or Flutter application.
- You require an SFTP client to upload, download, and manage remote files.
- You need a pure Dart SSH implementation that works across mobile, desktop, and web platforms.
Skip it when
- You are running in a browser environment where direct TCP sockets are not available and you have not supplied a WebSocket-to-TCP proxy or alternative transport.
- You need an SSH server implementation rather than a client.
Strengths
- Written in pure Dart with support for mobile, desktop, and web environments.
- Supports SSH sessions, key authentication, port forwarding, and SFTPv3 operations.
- Offloads heavy key exchange calculations to background isolates on supported VM platforms.
Weaknesses
- Requires custom transport configuration (like WebSockets) when used on Flutter Web since direct TCP sockets are unavailable.
- Some platform-specific cipher limitations exist in browser targets (e.g., Poly1305).
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
No special build runner or native SDK dependencies required; for web usage, a WebSocket bridge transport must be implemented.
void main() async {
final client = SSHClient(
await SSHSocket.connect('localhost', 22),
username: '<username>',
onPasswordRequest: () => '<password>',
);
}Alternatives
Packages that do the same job and could replace dartssh2.
- http2
An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.
91Compare - nm
Client for interacting with Linux NetworkManager via D-Bus
81Compare - graphql_flutter
A GraphQL client for Flutter with widget wrappers and hooks.
76Compare - graphql
A Dart GraphQL client offering queries, mutations, subscriptions and cache management.
79Compare
Works with
Packages commonly used together with dartssh2: ones it builds on, ones built on it, and its own family.
- convertdartssh2 depends on itEncoders and decoders for converting between different data representations.
- pointycastledartssh2 depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- asn1libdartssh2 depends on itEncodes and decodes ASN.1 objects using BER byte encoding in Dart.
- pinenacldartssh2 depends on itDart implementation of TweetNaCl cryptographic library with high-level APIs
- ftpconnectBuilt on dartssh2Interact with FTP, FTPS, FTPES, and SFTP servers to upload, download, and manage files.