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

internal inconsistency #327

Closed
wmtdpl opened this issue Dec 23, 2019 · 1 comment
Closed

internal inconsistency #327

wmtdpl opened this issue Dec 23, 2019 · 1 comment

Comments

@wmtdpl
Copy link

wmtdpl commented Dec 23, 2019

Download file from sftp 1.10.1, appear this:
ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [[email protected] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256]

I add the KeyExchange to ClientConfig
sshconfig := ssh.Config{}
sshconfig.SetDefaults()
sshconfig.KeyExchanges = append(
sshconfig.KeyExchanges,
"diffie-hellman-group-exchange-sha256",
"diffie-hellman-group-exchange-sha1",
)

	configTmp := &ssh.ClientConfig{
		Config: sshconfig,
		User: client.User,
		Auth: []ssh.AuthMethod{
			ssh.Password(client.Password),
		},
		HostKeyCallback: ssh.InsecureIgnoreHostKey(),
	}

Then an error message appears:internal inconsistency
I found that the size of maxpacket is 1 << 15(322768), but the downloaded file size is 32769, In fact, the file size is greater than 32769. It seems that only one package has been downloaded.
Is there a way to solve this problem?
thanks

@eikenb
Copy link
Member

eikenb commented Dec 30, 2019

This problem is due to an upstream bug in the x/crypto/ssh library for which I've already filed a bug golang/go#32075. I'm closing this as a duplicate of the issue that had me file the upstream issue, #287.

@eikenb eikenb closed this as completed Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants