SSH 2.0 Client
```rust 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 timeout (preferably after authentication): conn.mutatestream(|stream| { let duration = std::time::Duration::frommillis(200); stream.setreadtimeout(Some(duration)).unwrap() });
let run = conn.run("git-upload-pack rust-lang/rust.git").unwrap(); ```
With few modifications, you can implement a server from this code.