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

添加机器后cachecloud开始报错 Caused by: java.io.IOException: Cannot negotiate, proposals do not match. #324

Closed
LonelyBean opened this issue Jan 23, 2024 · 3 comments

Comments

@LonelyBean
Copy link

java.io.IOException: There was a problem while connecting to 192.168.79.131:22
at ch.ethz.ssh2.Connection.connect(Connection.java:699)
at com.sohu.cache.ssh.SSHTemplate$1.execute(SSHTemplate.java:102)
at com.sohu.cache.util.IdempotentConfirmer.run(IdempotentConfirmer.java:27)
at com.sohu.cache.ssh.SSHTemplate.getConnection(SSHTemplate.java:122)
at com.sohu.cache.ssh.SSHTemplate.execute(SSHTemplate.java:50)
at com.sohu.cache.ssh.SSHUtil.getMachineInfo(SSHUtil.java:73)
at com.sohu.cache.machine.impl.MachineCenterImpl.collectMachineInfo(MachineCenterImpl.java:144)
at com.sohu.cache.machine.impl.MachineCenterImpl$1.execute(MachineCenterImpl.java:118)
at com.sohu.cache.machine.impl.MachineCenterImpl$1.execute(MachineCenterImpl.java:115)
at com.sohu.cache.async.KeyCallable.call(KeyCallable.java:22)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at ch.ethz.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:91)
at ch.ethz.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:229)
at ch.ethz.ssh2.Connection.connect(Connection.java:655)
... 13 common frames omitted
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at ch.ethz.ssh2.transport.KexManager.handleMessage(KexManager.java:412)
at ch.ethz.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:753)
at ch.ethz.ssh2.transport.TransportManager$1.run(TransportManager.java:468)
... 1 common frames omitted
环境:cachecloud -3.2
虚拟机:CentOS Stream release 9

@githubname1024
Copy link
Collaborator

可以按照网上解决方式,修改一下KexAlgorithms。
#302

@zergduan
Copy link

这是因为cachecloud还在使用已经不安全的SHA-1算法导致的。高版本SSH已经因为安全原因已经排除了SHA-1算法。所以当cachecloud是使用SHA-1的密钥交换算法和主机密钥算法来SSH通信服务器时,就会因为协商失败,导致草错:Cannot negotiate, proposals do not match

两个办法:

  1. 修改cachecloud,使用安全的SHA-2(sha-256/sha-384)算法
  2. 修改服务器,重新启用不安全的SHA-1算法

sshd -T 就可以看到当前SSH service支持的各种算法...

@githubname1024
Copy link
Collaborator

Note:
当前CacheCloud最新main 分支,已升级ssh客户端, 可以拉取使用。
如有问题,欢迎告知。

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

No branches or pull requests

3 participants