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/knownhosts: doesn't match any host when known_hosts has more than one host #19994

Closed
mcuadros opened this issue Apr 16, 2017 · 6 comments

Comments

@mcuadros
Copy link

mcuadros commented Apr 16, 2017

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

go version go1.8 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mcuadros/workspace/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build177755887=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

knownhosts.Host with a known_hosts generated by the standard openssh

What did you expect to see?

Validate a known host.

What did you see instead?

Doesn't validate and reports as matched the last line.

@bradfitz bradfitz changed the title ssh/knownhosts: doesn't match any host when known_hosts has more than one host x/crypto/ssh/knownhosts: doesn't match any host when known_hosts has more than one host Apr 16, 2017
@gopherbot gopherbot added this to the Unreleased milestone Apr 16, 2017
@gopherbot
Copy link

CL https://golang.org/cl/40911 mentions this issue.

@odeke-em
Copy link
Member

@bradfitz check this out: isn't this weird that by just mentioning this issue in a repo that we don't own, the issue gets closed? Should we be filing a bug with Github, otherwise anyone can close Go/other project issues just by cross reference, which might be the unintended case for people that make Go repo mirrors on Github and commit here.

@odeke-em odeke-em reopened this Apr 17, 2017
@mcuadros
Copy link
Author

mcuadros commented Apr 18, 2017

@odeke-em yep, this is weird, I guess that this happened because I am the author of the issue and also the owner of the organization where the PR was merged.

Thanks for reopening.

@artyom
Copy link
Member

artyom commented Apr 19, 2017

I believe this is fixed with golang/crypto@efac7f2

@odeke-em
Copy link
Member

@mcuadros could you try with the latest crypto code, to confirm that the CL referred to by @artyom https://go-review.googlesource.com/c/40937 fixes the problem?

The code in the fixing CL looks quite identical to yours @mcuadros.

@mcuadros
Copy link
Author

mcuadros commented May 4, 2017

yup is fixed, thanks

@mcuadros mcuadros closed this as completed May 4, 2017
@golang golang locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants