From 5403d15dfb84e2a8c1b4dd605f23aba2ec7183f4 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 23 Mar 2023 14:02:29 -0400 Subject: [PATCH] fix(server): allow keyless --- server/ssh.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/ssh.go b/server/ssh.go index 6f7898ca3..9ee3d0ace 100644 --- a/server/ssh.go +++ b/server/ssh.go @@ -70,8 +70,8 @@ func (s *SSHServer) PublicKeyHandler(ctx ssh.Context, pk ssh.PublicKey) bool { } // KeyboardInteractiveHandler handles keyboard interactive authentication. -func (s *SSHServer) KeyboardInteractiveHandler(_ ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool { - return true +func (s *SSHServer) KeyboardInteractiveHandler(ctx ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool { + return s.cfg.Backend.AllowKeyless() && s.PublicKeyHandler(ctx, nil) } // Middleware adds Git server functionality to the ssh.Server. Repos are stored