ssh登录报错:no common kex alg
ssh登录solaris10时报错:
Jan 19 11:02:51 node1 sshd[7489]: fatal: no common kex alg: client 'diffie-hellman-group1-sha1', server 'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g=='
这个问题是由于ssh的密钥引起的,需要重新生成rsa和dsa key.
root@node1 :/etc/ssh #> ls -ltr
total 194
-rwxr--r-- 1 root sys 861 Jan 22 2005 ssh_config
-rwxr--r-- 1 root sys 88301 Jan 22 2005 moduli
-rwxr--r-- 1 root root 887 Nov 7 2010 ssh_host_rsa_key
-rwxr--r-- 1 root root 227 Nov 7 2010 ssh_host_rsa_key.pub
-rwxr--r-- 1 root root 668 Nov 7 2010 ssh_host_dsa_key
-rwxr--r-- 1 root root 607 Nov 7 2010 ssh_host_dsa_key.pub
-rwxr--r-- 1 root sys 5026 Nov 7 2010 sshd_config
删除原来密钥
root@node1 :/etc/ssh #> rm -rf ssh_host_*生成新密钥
root@node1 :/etc/ssh #> /lib/svc/method/sshd -c
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair重启ssh服务
root@node1 :/etc/ssh #> svcadm restart ssh