Skip to content

Commit 9e8e0b3

Browse files
packrat386FiloSottile
authored andcommitted
ssh: improve error message for KeyboardInteractiveChallenge
Fixes golang/go#41823 Change-Id: I4653f23239bdf2ab472d3d15c6653b89ebf7ccd4 GitHub-Last-Rev: 179b3ee GitHub-Pull-Request: golang#158 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/259902 Trust: Roland Shoemaker <[email protected]> Run-TryBot: Filippo Valsorda <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
1 parent 84dcc77 commit 9e8e0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssh/client_auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe
471471
}
472472

473473
if len(answers) != len(prompts) {
474-
return authFailure, nil, errors.New("ssh: not enough answers from keyboard-interactive callback")
474+
return authFailure, nil, fmt.Errorf("ssh: incorrect number of answers from keyboard-interactive callback %d (expected %d)", len(answers), len(prompts))
475475
}
476476
responseLength := 1 + 4
477477
for _, a := range answers {

0 commit comments

Comments
 (0)