ssh: return unexpected msg error when server fails keyboard-interactive auth early by samiponkanen · Pull Request #297 · golang/crypto (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation48 Commits1 Checks1 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

samiponkanen

Seems the OpenSSH server running on windows fails keyboard-interactive
auth this way without sending any prompt to client. In such case the
golang ssh client should not retry keyboard-interactive auth when the
auth method is wrapped in a RetryableAuthMethod(). Rather the auth
method should be immediately marked as tried&failed and the client auth
process should move on to next available and acceptable auth method.

Fixes golang/go#67855

@gopherbot

This PR (HEAD: 4df2f67) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

@gopherbot

This PR (HEAD: 95b457c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@samiponkanen samiponkanen changed the titlessh: fail keyboard-interactive auth with unexpectedMessageError() when auth fails before receiving the UserAuthInfoRequest from server crypto/ssh: crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early

Jun 16, 2024

@gopherbot

This PR (HEAD: 732afad) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@samiponkanen samiponkanen changed the titlecrypto/ssh: crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early

Jun 16, 2024

@gopherbot

This PR (HEAD: b5cef16) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

This PR (HEAD: 28c1119) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

This PR (HEAD: 3197aea) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

This PR (HEAD: b0e0ee1) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

Message from Ian Lance Taylor:

Patch Set 8: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Go LUCI:

Patch Set 8:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-09-29T04:44:17Z","revision":"05fa40fa25835defdf17389e58de831828ad5d97"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

@gopherbot

@gopherbot

@gopherbot

@gopherbot

@gopherbot

This PR (HEAD: f2a8ba2) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

This PR (HEAD: 4f1243e) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

Message from Go LUCI:

Patch Set 13:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-09-29T14:08:10Z","revision":"abbd9b1b5bb33fde96cf620bbb60bb40349ed5aa"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

@gopherbot

Message from Go LUCI:

Patch Set 13:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

@gopherbot

@gopherbot

This PR (HEAD: e902116) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@samiponkanen samiponkanen changed the titlecrypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early ssh: return unexpected msg error when server fails keyboard-interactive auth early

Oct 15, 2024

@samiponkanen

@gopherbot

This PR (HEAD: 7fafc4d) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.

Important tips:

@gopherbot

@gopherbot

@gopherbot

@gopherbot

Message from Go LUCI:

Patch Set 15:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-10-15T13:20:26Z","revision":"7caa73b438116475ede4ee66f6813f8b61bb8d37"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

@gopherbot

Message from Go LUCI:

Patch Set 15:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

@gopherbot

Message from Dmitri Shuralyov:

Patch Set 15: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Ian Lance Taylor:

Patch Set 16: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Ian Lance Taylor:

Patch Set 16: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Go LUCI:

Patch Set 16:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2024-10-16T02:36:47Z","revision":"5f5cfd4ef501d97b3bfca21afe6a7ec7f4fecb53"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Ian Lance Taylor:

Patch Set 16: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

Message from Go LUCI:

Patch Set 16:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!

@gopherbot

gopherbot pushed a commit that referenced this pull request

Oct 16, 2024

@samiponkanen @gopherbot

…ve auth early

Seems the OpenSSH server running on windows fails keyboard-interactive auth this way without sending any prompt to client. In such case the golang ssh client should not retry keyboard-interactive auth when the auth method is wrapped in a RetryableAuthMethod(). Rather the auth method should be immediately marked as tried&failed and the client auth process should move on to next available and acceptable auth method.

Fixes golang/go#67855

Change-Id: I6c64ae58ff8325774e37af716601b112f8833d8f GitHub-Last-Rev: 7fafc4d GitHub-Pull-Request: #297 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/590956 LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com Reviewed-by: Dmitri Shuralyov dmitshur@google.com Reviewed-by: Ian Lance Taylor iant@google.com Auto-Submit: Nicola Murino nicola.murino@gmail.com Reviewed-by: Nicola Murino nicola.murino@gmail.com

@gopherbot

2 participants

@samiponkanen @gopherbot