报错信息:

   1. Xshell远程连接报如下:

       找不到匹配的key exchange 算法。

   2. 其他主机shell中ssh连无法登陆主机,报:

       no common kex alg: client 'diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1', server 'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g=='

   3. 无法登陆主机dmesg报:

       Mar 31 09:13:35 host1 sshd[955]: [ID 800047 auth.crit] fatal: no common kex alg: client 'diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1', server 'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g=='


   以上报错信息是同一个问题,产生这种问题的一个原因是手都生成过ssh的秘钥。

   

解决方案:

   1. rm /etc/ssh/ssh_host_*
   2. /lib/svc/method/sshd -c (to create new rsa/dsa host pair key)
   3. svcadm restart ssh


Solaris 10、Solaris 11出现这种问题,解决方法一致,同上。