I recently upgraded my system to Solaris Nevada build 136 and on trying to ssh into that machine, I started seeing the "no kex alg" message. The reason is that sshd doesn't accept the connection because it's ssh keys haven't been generated.

Here is how I generated the ssh keys:


root@ben22:~# /lib/svc/method/sshd -c

root@ben22:~# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

Generating public/private dsa key pair.

/etc/ssh/ssh_host_dsa_key already exists.

Overwrite (yes/no)? yes

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /etc/ssh/ssh_host_dsa_key.

Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.

The key fingerprint is:

8c:d7:b1:c5:e0:87:f7:83:dc:80:e5:ad:31:36:13:f5 root@ben22

root@ben22:~# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

Generating public/private rsa key pair.

/etc/ssh/ssh_host_rsa_key already exists.

Overwrite (yes/no)? yes

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /etc/ssh/ssh_host_rsa_key.

Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.

The key fingerprint is:

35:24:ae:0e:58:85:39:06:67:9b:b6:85:ca:21:f9:af root@ben22

root@ben22:~# svcadm refresh ssh

root@ben22:~# svcadm exit




Ramin-Moazenis-MacBook-2:~ raminmoazeni$ ssh -l root ben22.sfbay

The authenticity of host 'ben22.sfbay (10.6.221.195)' can't be established.

RSA key fingerprint is 35:24:ae:0e:58:85:39:06:67:9b:b6:85:ca:21:f9:af.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'ben22.sfbay,10.6.221.195' (RSA) to the list of known hosts.

Password:

Last login: Fri Apr 9 22:24:32 2010 from

Sun Microsystems Inc. SunOS 5.11 snv_136 March 2010

root@ben22:~#






Read More about ["no kex alg" message while logging with ssh...