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:
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):
added the host keys to my sshd configuration file:
# Paths to host keys HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key
And then ran ‘svcadm refresh ssh’ to restart the service. Once that completed, I was able to login to the host. Nice!