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
Milestone

Comments

@CameronGo
Copy link

@CameronGo CameronGo commented May 1, 2017

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 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 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 <astupakov@pivotal.io>
Ajibola added a commit to Ajibola/packer-builder-linode that referenced this issue Nov 10, 2017
@jilieryuyi
Copy link

@jilieryuyi jilieryuyi commented Nov 17, 2017

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.