Crate thrussh [] [src]

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.

Modules

auth
client
key
server
sodium

Structs

ChannelBuf
CryptoBuf
SignalName

Enums

Error
ReturnCode

Constants

SIGABRT
SIGALRM
SIGFPE
SIGHUP
SIGILL
SIGINT
SIGKILL
SIGPIPE
SIGQUIT
SIGSEGV
SIGTERM
SIGUSR1

Traits

Client
Server

Functions

load_public_key
load_secret_key
read_public_key