Skip to content
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: KeyboardInteractiveChallenge error message is incorrect #41823

Closed
packrat386 opened this issue Oct 6, 2020 · 3 comments
Closed

x/crypto/ssh: KeyboardInteractiveChallenge error message is incorrect #41823

packrat386 opened this issue Oct 6, 2020 · 3 comments

Comments

@packrat386
Copy link

@packrat386 packrat386 commented Oct 6, 2020

What version of Go are you using (go version)?

$ go version

go version go1.15.1 linux/amd64

Does this issue reproduce with the latest release?

I haven't checked, but the error message is the same on the master branch.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/acoyle/.cache/go-build"
GOENV="/home/acoyle/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/acoyle/go/pkg/mod"
GOOS="linux"
GOPATH="/home/acoyle/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build040277230=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When using the ssh.KeyboardInteractiveChallenge authentication method, I returned answers []string that was larger in size than the the input questions []string. I then passed this config to ssh.Dial.

What did you expect to see?

ssh.Dial should fail with an error message saying too many answers were provided for the questions asked by the challenge.

What did you see instead?

ssh.Dial failed with the error message ssh: not enough answers from keyboard-interactive callback.

@gopherbot gopherbot added this to the Unreleased milestone Oct 6, 2020
@packrat386
Copy link
Author

@packrat386 packrat386 commented Oct 6, 2020

This seems like it should be pretty trivial to change, and I'd be happy to submit a PR. The contribution guide said it was best to submit an issue first so I filed this as well.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 13, 2020

Yes, filing an issue and discussing it first is very helpful, thanks.

CC @FiloSottile per owners.

@dmitshur dmitshur changed the title x/crypto ssh.KeyboardInteractiveChallenge error message is incorrect x/crypto/ssh: KeyboardInteractiveChallenge error message is incorrect Oct 13, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 14, 2020

Change https://golang.org/cl/259902 mentions this issue: ssh: improve error message for KeyboardInteractiveChallenge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.