Crate libssh_rs

Source
Expand description

This crate provides ergonomic bindings to the functions provided by libssh, a library that provides an implementation of the SSH 2 protocol. It is distinct from the ssh2 rust crate which uses libssh2, which is an unrelated project that implements similar functionality!

Re-exports§

pub use libssh_rs_sys as sys;

Structs§

AuthMethods
bitflags that indicates permitted authentication methods
Channel
Represents a channel in a Session.
InteractiveAuthInfo
Represents the overall set of instructions in keyboard-interactive auth
InteractiveAuthPrompt
Represents a question prompt in keyboard-interactive auth
Metadata
Represents metadata about a file. libssh returns this in a couple of contexts, and not all fields are used in all contexts.
OpenFlags
Bitflags that indicate options for opening a sftp file.
Session
A Session represents the state needed to make a connection to a remote host.
SetAttributes
Change multiple file attributes at once. If a field is_some, then its value will be applied to the file on the server side. If it is_none, then that particular field will be left unmodified.
Sftp
SftpDir
SftpError
SftpFile
SignalState
SshKey
Represents the public key provided by the remote host

Enums§

AuthStatus
Indicates the disposition of an authentication operation
Error
Represents an error condition
FileType
KnownHosts
Indicates the state of known-host matching, an important set to detect and avoid MITM attacks.
LogLevel
Allows configuring the underlying libssh debug logging level
PollStatus
Indicates available data for the stdout or stderr on a Channel.
PublicKeyHashType
The type of hash to use when inspecting a public key fingerprint
SshOption
Allows configuring different aspects of a Session. You always need to set at least SshOption::Hostname.

Functions§

get_input
A utility function that will prompt the user for input via the console/tty.

Type Aliases§

SshResult
Represents the result of a fallible operation