5403d15dfb84e2a8c1b4dd605f23aba2ec7183f4
- Author
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Committer
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Date
Message
fix(server): allow keyless
Diff
1diff --git a/server/ssh.go b/server/ssh.go
2index 6f7898ca3f207c80b47ce7771784e5643aed5453..9ee3d0ace68c00662070b9023dd058a31e48eeee 100644
3--- a/server/ssh.go
4+++ b/server/ssh.go
5@@ -70,8 +70,8 @@ func (s *SSHServer) PublicKeyHandler(ctx ssh.Context, pk ssh.PublicKey) bool {
6 }
7
8 // KeyboardInteractiveHandler handles keyboard interactive authentication.
9-func (s *SSHServer) KeyboardInteractiveHandler(_ ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool {
10- return true
11+func (s *SSHServer) KeyboardInteractiveHandler(ctx ssh.Context, _ gossh.KeyboardInteractiveChallenge) bool {
12+ return s.cfg.Backend.AllowKeyless() && s.PublicKeyHandler(ctx, nil)
13 }
14
15 // Middleware adds Git server functionality to the ssh.Server. Repos are stored