Docs.rs
  • ssh-rs-0.5.0
    • ssh-rs 0.5.0
    • Permalink
    • Docs.rs crate page
    • MIT
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • 1148118271
    • HsuJv
    • Dependencies
      • aes ^0.8 normal
      • cbc ^0.1 normal optional
      • cipher ^0.4 normal optional
      • ctr ^0.9 normal
      • des ^0.8 normal optional
      • dsa ^0.6.1 normal optional
      • filetime ^0.2 normal optional
      • flate2 ^1.0 normal
      • num-bigint ^0.4 normal
      • rand ^0.8 normal
      • ring ^0.17 normal
      • rsa ^0.9 normal
      • sha1 ^0.10.5 normal optional
      • sha2 ^0.10.6 normal
      • signature ^2.1 normal
      • ssh-key ^0.6 normal
      • strum ^0.25 normal
      • strum_macros ^0.25 normal
      • thiserror ^1.0 normal
      • tracing ^0.1.36 normal
      • paste ^1 dev
      • tracing-subscriber ^0.3 dev
      • ring ^0.17 normal
    • Versions
    • 14.55% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate ssh

ssh0.5.0

  • All Items

Crate Items

  • Re-exports
  • Modules
  • Structs
  • Enums
  • Functions

Crates

  • ssh

Crate ssh

Source
Expand description

Dependencies

ssh-rs = "0.5.0"

Rust implementation of ssh2.0 client.

Basic usage

use ssh;

let mut session = ssh::create_session()
    .username("ubuntu")
    .password("password")
    .private_key_path("./id_rsa")
    .connect("127.0.0.1:22")
    .unwrap()
    .run_local();
let exec = session.open_exec().unwrap();
let vec: Vec<u8> = exec.send_command("ls -all").unwrap();
println!("{}", String::from_utf8(vec).unwrap());
// Close session.
session.close();

For more usage examples and details, please see the Readme & Examples in our git repo

Re-exports§

pub use error::SshError;
pub use error::SshResult;

Modules§

algorithm
error

Structs§

ChannelBroker
ExecBroker
LocalChannel
LocalExec
LocalSession
LocalShell
SessionBroker
SessionBuilder
SessionConnector
ShellBrocker
TerminalSize

Enums§

TerminalSizeType

Functions§

create_session
create a session via session builder w/ default configuration
create_session_without_default
create a session via session builder w/o default configuration

Results

Settings
Help
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.