print if connection is true or false

This commit is contained in:
Aaron Honeycutt 2025-07-03 18:11:54 -06:00
parent 26bcc8fb80
commit 82f553d712

View file

@ -15,7 +15,10 @@ fn main() {
// Try to authenticate with the first identity in the agent.
sess.userauth_agent(USER).unwrap();
// Make sure we succeeded
assert!(sess.authenticated());
if sess.authenticated() {
println!("Authentication successful!");
} else {
println!("Authentication failed!");
}
}