ssh2 0.9.1

Bindings to libssh2 for interacting with SSH servers and executing remote commands, forwarding local ports, etc.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ssh2::Session;

#[test]
fn smoke() {
    let sess = Session::new().unwrap();
    let mut agent = sess.agent().unwrap();
    agent.connect().unwrap();
    agent.list_identities().unwrap();
    {
        let a = agent.identities().unwrap();
        let i1 = &a[0];
        assert!(agent.userauth("foo", &i1).is_err());
    }
    agent.disconnect().unwrap();
}