首页 > 学院 > 操作系统 > 正文

ssh server 不支持diffie-hellman-group1-sha1问题

2019-12-14 00:01:16
字体:
来源:转载
供稿:网友

Ubuntu 一般只默认安装openssh_client,需要对Ubuntu进行ssh需要安装openssh_server

最新版本openssh_server在ubuntu默认用7.2版本的,在7.2版本其官网声明已经Disabled diffie-hellman-group1-sha1 by default

如果还使用低版本的Poderosa之类的,默认还在用diffie-hellman-group1-sha1。

查看openssh_client允许的keyexchange方法可用ssh -Q key

查看当前openssh_server允许的keyexchange方法可用 sshd -T | grep kex 查看server允许的keyexchange

可以选择升级Poderosa,或者降级安装openssh_client 6.6左右版本

如果降级后还不支持,可以进入修改 /etc/ssh/sshd_config 

添加

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

然后运行

ssh-keygen -A 来重新生成所有钥匙

之后service ssh restart重启sshd


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表