Pure-rust SSH 2.0 Client
```rust use std::net::TcpStream; use coolssh::{createed25519keypair, Connection};
let githubaccountid = "john.doe@gmail.com"; let (opensshencodedpubkey, keypair) = createed25519keypair(githubaccountid);
println!("{}", opensshencodedpubkey);
// Add this public key to authorized_keys
on your server
// -> https://github.com/settings/keys
let stream = TcpStream::connect("github.com:22").unwrap(); let mut conn = Connection::new(stream, ("git", &keypair).into()).unwrap();
// set appropriate read timeout (preferably after authentication): conn.mutatestream(|stream| { let timeout = std::time::Duration::frommillis(200); stream.setreadtimeout(Some(timeout)).unwrap() });
let run = conn.run("git-upload-pack rust-lang/rust.git").unwrap(); ```
Feel free to submit pull request for these.