From e3724448a2f2538d43135e61243ed0342bc9bff7 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 7 Nov 2021 15:23:07 -0500 Subject: fix(xanthous/server): Accept password authentication Accept password authentication in addition to public key authentication, but ignore the actual password, so that clients without ssh keys configured (or configured to send no ssh keys) can authenticate. Change-Id: I86130b9725d1928ac45b5db55f18c09687ee0fd5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3807 Tested-by: BuildkiteCI Reviewed-by: grfn --- users/grfn/xanthous/server/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'users/grfn') diff --git a/users/grfn/xanthous/server/src/main.rs b/users/grfn/xanthous/server/src/main.rs index 915d1c94db..8441a5db37 100644 --- a/users/grfn/xanthous/server/src/main.rs +++ b/users/grfn/xanthous/server/src/main.rs @@ -174,6 +174,12 @@ impl server::Handler for Handler { self.finished_auth(Auth::Accept) } + fn auth_password(mut self, username: &str, _password: &str) -> Self::FutureAuth { + info!(%username, "Accepted new connection"); + self.username = Some(username.to_owned()); + self.finished_auth(Auth::Accept) + } + fn auth_publickey( mut self, username: &str, -- cgit 1.4.1