This commit is contained in:
Eugene Pankov 2022-08-14 13:02:46 +02:00
parent c5cf5bf1d1
commit 744d686027
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
3 changed files with 13 additions and 5 deletions

View file

@ -18,7 +18,8 @@ use russh_keys::PublicKeyBase64;
pub use server::run_server;
use uuid::Uuid;
use warpgate_common::{
ProtocolName, ProtocolServer, Services, Target, TargetOptions, TargetTestError, SshHostKeyVerificationMode,
ProtocolName, ProtocolServer, Services, SshHostKeyVerificationMode, Target, TargetOptions,
TargetTestError,
};
use crate::client::{RCCommand, RemoteClient};
@ -82,7 +83,15 @@ impl ProtocolServer for SSHProtocolServer {
println!("\nHost key ({}): {}", key.name(), key.public_key_base64());
println!("There is no trusted {} key for this host.", key.name());
match self.services.config.lock().await.store.ssh.host_key_verification {
match self
.services
.config
.lock()
.await
.store
.ssh
.host_key_verification
{
SshHostKeyVerificationMode::AutoAccept => {
let _ = reply.send(true);
}

View file

@ -1064,8 +1064,7 @@ impl ServerSession {
};
login_url.set_path("@warpgate");
login_url
.set_fragment(Some(&format!("/login/{auth_state_id}")));
login_url.set_fragment(Some(&format!("/login/{auth_state_id}")));
russh::server::Auth::Partial {
name: Cow::Owned(format!(

View file

@ -53,7 +53,7 @@ pub(crate) async fn command(cli: &crate::Cli, target_name: &String) -> Result<()
}
Ok(()) => {
info!("Connection successful!");
return Ok(())
return Ok(());
}
}