ssh2 0.3.3

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
16
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 mut a = agent.identities();
        let i1 = a.next().unwrap().unwrap();
        a.count();
        assert!(agent.userauth("foo", &i1).is_err());
    }
    agent.disconnect().unwrap();
}