博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ssh通道连接数据库问题
阅读量:7225 次
发布时间:2019-06-29

本文共 1414 字,大约阅读时间需要 4 分钟。

hot3.png

自用的一台服务器上次yum update到centos 7.4,刚才发现跳转不过去了,提示:

175232_rWX8_947563.png

expected key exchange group packet from server

赶紧登陆服务器看一下,诶,可以ssh登陆啊。SSH通道换成密码的形式,也是不行。

看一下SSHD的日志

 journalctl --unit sshd --no-pager 

Jan 24 17:51:20 hk sshd[1989]: /etc/ssh/sshd_config line 50: Deprecated option RSAAuthenticationJan 24 17:51:20 hk systemd[1]: Started OpenSSH server daemon.Jan 24 17:51:22 hk sshd[1990]: rexec line 50: Deprecated option RSAAuthenticationJan 24 17:51:22 hk sshd[1990]: error: kex protocol error: type 30 seq 1 [preauth]

 嘿,升级了openssh版本了啊,这个配置参数已经是被废弃掉的

于是我备份一下/etc/ssh/sshd_config文件便删掉了50行的RSAAuthentication

重启再试,嘿,还是不行,现在就剩下这句提示了:

error: kex protocol error: type 30 seq 1 [preauth]

度娘一下,悻悻的打开了小飞机,发现这篇文章有着跟我一样的情况

https://github.com/Studio3T/robomongo/issues/1125

得,试试呗。

# Add this to /etc/ssh/sshd_config
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1提示什么缺少什么自行添加KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
# systemctl restart sshd

原因大概就是

use , and libssh2 only support diffie-hellman key exchange methods

而且升级libssh2也不能解决,应该是个bug。

ps:只有在centos 7.4版本出现,7.3和7.5均没有这种情况

转载于:https://my.oschina.net/longquan/blog/1612533

你可能感兴趣的文章
Powershell渗透测试系列–进阶篇
查看>>
java中的equals和==
查看>>
java解析邮箱中的邮件信息
查看>>
Lombok使用详解(转)
查看>>
Java中泛型Class<T>、T与Class<?>
查看>>
Android Toolbar的使用 顶部标题栏+后退键
查看>>
[LeetCode] All Paths From Source to Target 从起点到目标点到所有路径
查看>>
[React Testing] Confidently Ship Production React Apps
查看>>
js进阶 12-18 jquery如何实现自定义右键菜单(把问题分细)
查看>>
使用 JSON JavaScriptSerializer 进行序列化或反序列化时出错
查看>>
js将日期格式转换为YYYY-MM-DD HH:MM:SS
查看>>
前端UI框架选择区别对比推荐
查看>>
Python游戏《外星人入侵》来了~
查看>>
设计模式-结构型模式,python组合模式
查看>>
echarts 与 百度地图bmap结合系列: 如何设置地图缩放级别和监听缩放事件
查看>>
nginx set变量后lua无法改值
查看>>
RabbitMQ Performance Testing Tool 性能测试工具
查看>>
rabbitMQ 常用命令
查看>>
java中如何模拟真正的同时并发请求?
查看>>
iostat中的util和svctm (Two traps in iostat: %util and svctm)
查看>>