一、配置服务器
root@sky9890:~# apt-get install ssh #安装
root@sky9890:~# systemctl restart ssh
root@sky9890:~# vi /etc/ssh/ssh_config #配置
......
Port 22 #启用端口号,并可以修改端口数
......
二、问题描述
SecureCRT、putty等远程工具连接openkylin报如下错误:
Key exchange failed.
No compatible key-exchange method. The server supports these methods: curve25519-sha256,[email protected],
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,
diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
三、解决方式
1.方法一
升级远程连接工具,将老版本升级到新版本即可。
2.方法二
sky9890@sky9890:~$ sudo vi /etc/ssh/sshd_config
......
KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,di
ffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diff
ie-hellman-group1-sha1
sky9890@sky9890:~$ sudo systemctl restart ssh
标签:sha2,hellman,sky9890,ecdh,openkylin,putty,ssh,SecureCRT,sha256
From: https://blog.51cto.com/sky9896/9386068