thrussh_scp 0.4.0

An scp client on top of thrussh_client
extern crate thrussh_client;
extern crate thrussh_scp;
extern crate env_logger;
use thrussh_scp::*;
use std::fs::File;

fn main() {
    let mut client = thrussh_client::SSHClient::new("localhost", 22).unwrap();
    let key = thrussh_client::load_secret_key("/home/pe/.ssh/id_ed25519").unwrap();
    client.session().set_auth_public_key("pe".to_string(), key);
    // Run until the authentication has completed.
    // Send a file.
    let contents = b"file_contents\n";
    let len = contents.len();
    client.send_file("/tmp", "blabla", &contents[..], len, 0o644).unwrap();
    // Receive the file we just sent.
    let file = File::create("blibli").unwrap();
    client.receive_file("/tmp/blabla", file).unwrap();