From e895ef9d77ca966b48a0b9237d1ec44d9d8df5bc Mon Sep 17 00:00:00 2001 From: ArchBlood <35392110+ArchBlood@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:05:23 -0400 Subject: [PATCH] Update main.rs Signed-off-by: ArchBlood <35392110+ArchBlood@users.noreply.github.com> --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 135c832..1570e5c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,12 @@ -use std::net::TcpStream; use std::io::{self, Read}; use std::fs::File; use serde::{Deserialize}; use trust_dns_resolver::{Resolver, config::ResolverConfig, config::ResolverOpts}; +use std::net::TcpStream; #[derive(Debug, Deserialize)] struct Config { domain_name: String, - server_ip: String, host: String, username: String, password: String, @@ -29,7 +28,8 @@ fn run() -> io::Result<()> { println!("DNS record updated successfully: {:?}", response); - let tcp = TcpStream::connect(format!("{}:22", config.host))?; + let _tcp = TcpStream::connect(format!("{}:22", config.host))?; + let mut sess = ssh2::Session::new()?; if let Err(err) = sess.handshake() { return Err(io::Error::new(io::ErrorKind::Other, err));