I built a couple of new Solaris 10 hosts today using a stripped down image, and was greeted with the following error when I tried to log in:
$ ssh 192.168.1.20
Unable to negotiate a key exchange method
The server was spitting out “no kex alg” errors, which appear to be due to key exchange issues. I poked around my sshd_config file, and for some reason the host host keys weren’t generated when the ssh service initialized. To fix this, I ran the ssh service with the -c option (this generated the RSA and DSA host keys):
$ /lib/svc/method/sshd -c
added the host keys to my sshd configuration file:
# Paths to host keys
And then ran ‘svcadm refresh ssh’ to restart the service. Once that completed, I was able to login to the host. Nice!