ssh通道连接数据库问题

自用的一台服务器上次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 RSAAuthentication
Jan 24 17:51:20 hk systemd[1]: Started OpenSSH server daemon.
Jan 24 17:51:22 hk sshd[1990]: rexec line 50: Deprecated option RSAAuthentication
Jan 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-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr
# systemctl restart sshd

原因大概就是

use libssh2, 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值