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: Failed to open ssh connection to the server: ssh: must specify HostKeyCallback #20200

Closed
CameronGo opened this issue May 1, 2017 · 2 comments

Comments

@CameronGo
Copy link

Please answer these questions before submitting your issue. Thanks!

No code changes were made, but I did my first code rebuild since Mar 22. Now the application is broken and getting the cited error message. My build environment uses the latest golang docker image and always does a go get -u.

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

go version go1.8.1 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"

What did you do?

I just did a code rebuild today and then the application attempted an SFTP connection using username and password credentials.

What did you expect to see?

A successful file transfer

What did you see instead?

This error: Failed to open ssh connection to the server: ssh: must specify HostKeyCallback

@bradfitz bradfitz changed the title Failed to open ssh connection to the server: ssh: must specify HostKeyCallback x/crypto/ssh: Failed to open ssh connection to the server: ssh: must specify HostKeyCallback May 1, 2017
@gopherbot gopherbot added this to the Unreleased milestone May 1, 2017
@bradfitz
Copy link
Contributor

bradfitz commented May 1, 2017

Yes, this was a breaking change made for security reasons.

You need to specify one. See #19767.

@bradfitz bradfitz closed this as completed May 1, 2017
stupakov pushed a commit to cloudfoundry-attic/cf-mysql-acceptance-tests that referenced this issue Jul 21, 2017
- this bump introduced a breaking change to the way SSH connections are
created (golang/go#20200)
- reverting to the same version of crypto that we had before we swapped
godep for dep

Signed-off-by: Alex Stupakov <[email protected]>
Ajibola added a commit to Ajibola/packer-builder-linode that referenced this issue Nov 10, 2017
@jilieryuyi
Copy link

the correct way to use ssh, then fix it . https://github.com/jilieryuyi/ssh-simple-client/blob/master/main.go

@golang golang locked and limited conversation to collaborators Nov 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants