-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/crypto/ssh: MaxAuthTries error log overwrite PasswordCallback error #69191
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Please don't use screenshots, they're impossible to read. |
Hello @seankhliao and thanks for your reply. I appologize for screenshots, when it asked me what i see, i taken screenshot x) I replaced screenshots with code block to improve visibility. |
CC @drakkan. |
With the above patch you should get the following error server side:
|
Change https://go.dev/cl/566398 mentions this issue: |
Hello everyone,
Go version
go version go1.23.0 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.dev/play/p/m5It0UH5B88 (its crash cause it cant listen on a port but the code "work" as example)
Iam starting a ssh server using the configuration "MaxAuthTries" set to 1 and "PasswordCallback" set to a custom function.
What did you see happen?
If an error happen during the PasswordCallback, on server side, the PasswordCallback error is overwrited by the MaxAuthTries error:
Server Side:
remi@fimafeng:~/Projects/ssh-server2$ go run main.go 2024/09/01 00:19:43 Starting SSH server on :2222 Starting SSH server on :2222 Failed to handshake: ssh: disconnect, reason 2: too many authentication failures
Client side:
What did you expect to see?
If i comment/remove the MaxAuthTries field from the conf, the error is displayed.
Server side:
Client SIde:
I would like, on server side, when the "MaxAuthTries" and "PasswordCallback" are set to show error from both.
(like for sshd) (here password incorrect and maxauthtries [preauth])
Server SIde:
Client SIde:
Is there a way to show logs for both when "MaxAuthTries" and "PasswordCallback" are set without breaking the design process of handshake ?
Is there a way to show logs in a live mode ? When MaxAuthTries is not set, the log appear on server side only when all attemps are done and not client try per try ?
When "MaxAuthTries" is not set and the error appear, i have an "no auth passed yet", what is this message ? Can i avoid it ?
Thanks for your time reading this issue.
Best Regards!
The text was updated successfully, but these errors were encountered: