use qssh::{QsshClient, QsshConfig, PqAlgorithm};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
env_logger::init();
let config = QsshConfig {
server: "localhost:22223".to_string(),
username: "test".to_string(),
port_forwards: vec![],
use_qkd: false,
pq_algorithm: PqAlgorithm::Falcon512,
key_rotation_interval: 3600,
};
println!("Creating client...");
let mut client = QsshClient::new(config);
println!("Attempting connection...");
match client.connect().await {
Ok(()) => {
println!("Connected successfully!");
println!("Disconnecting...");
client.disconnect().await?;
println!("Disconnected successfully!");
}
Err(e) => {
eprintln!("Connection failed: {}", e);
eprintln!("Error details: {:?}", e);
std::process::exit(1);
}
}
Ok(())
}