init: connection made

This commit is contained in:
Aaron Honeycutt 2025-07-03 17:54:08 -06:00
commit c0d58cd349
6 changed files with 415 additions and 0 deletions

20
src/main.rs Normal file
View file

@ -0,0 +1,20 @@
use std::net::TcpStream;
use ssh2::Session;
const EDI_IP: &str = "100.94.173.5";
fn main() {
// Connect to the local SSH server
let tcp = TcpStream::connect("100.94.173.5:22").unwrap();
let mut sess = Session::new().unwrap();
sess.set_tcp_stream(tcp);
sess.handshake().unwrap();
// Try to authenticate with the first identity in the agent.
sess.userauth_agent("aaronh").unwrap();
// Make sure we succeeded
assert!(sess.authenticated());
}