Struct ssh_rs::SessionBuilder
source · pub struct SessionBuilder { /* private fields */ }
Implementations§
source§impl SessionBuilder
impl SessionBuilder
pub fn new() -> Self
pub fn disable_default() -> Self
sourcepub fn timeout(self, timeout: u128) -> Self
pub fn timeout(self, timeout: u128) -> Self
add a globle r/w timeout for local ssh mode
set 0 to disable
pub fn username(self, username: &str) -> Self
pub fn password(self, password: &str) -> Self
pub fn private_key<K>(self, private_key: K) -> Selfwhere
K: ToString,
pub fn private_key_path<P>(self, key_path: P) -> Selfwhere
P: AsRef<Path>,
pub fn add_kex_algorithms(self, alg: Kex) -> Self
pub fn del_kex_algorithms(self, alg: Kex) -> Self
pub fn add_pubkey_algorithms(self, alg: PubKey) -> Self
pub fn del_pubkey_algorithms(self, alg: PubKey) -> Self
pub fn add_enc_algorithms(self, alg: Enc) -> Self
pub fn del_enc_algorithms(self, alg: Enc) -> Self
pub fn add_mac_algortihms(self, alg: Mac) -> Self
pub fn del_mac_algortihms(self, alg: Mac) -> Self
pub fn add_compress_algorithms(self, alg: Compress) -> Self
pub fn del_compress_algorithms(self, alg: Compress) -> Self
pub fn connect<A>(self, addr: A) -> SshResult<SessionConnector<TcpStream>>where
A: ToSocketAddrs,
sourcepub fn connect_bio<S>(self, stream: S) -> SshResult<SessionConnector<S>>where
S: Read + Write,
pub fn connect_bio<S>(self, stream: S) -> SshResult<SessionConnector<S>>where
S: Read + Write,
connect to target server w/ a bio object
which requires to implement std::io::{Read, Write}
Trait Implementations§
source§impl Default for SessionBuilder
impl Default for SessionBuilder
source§fn default() -> SessionBuilder
fn default() -> SessionBuilder
Returns the “default value” for a type. Read more