thrussh 0.2.0

A client and server SSH library. Memory-safe, doesn't do its own crypto (based on libsodium).
Documentation

Server and client SSH library. See the two example crates thrussh_client and thrussh_client on crates.io.

The source code for this crates and the examples is available online, just follow the instructions.

This library will never do much more than handling the SSH protocol. In particular, it does not run a main loop, does not call external processes, and does not do its own crypto.

If you want to implement an SSH server, create a type that implements the Server trait, create a server::Config, and then for each new connection, create a server session using let s = ServerSession::new(). Then, every time new packets are available, read as many packets as possible using ServerSession::read(..), and then write the answer using ServerSession::write(..).

Clients work almost in the same way, except if you want to provide a command line interface, which needs its own event loop. See the thrussh_client crate for an example.