An ssh server is running. The "ps" command shows us:
/usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -BBut when I try to ssh to it from my Fedora desktop, I get:
ssh ebaz Unable to negotiate with 192.168.0.80 port 22: no matching host key type found. Their offer: ssh-rsaI have been down this road before. The problem is that the modern ssh client on Fedora is too snobby to use the "ssh-rsa" protocol that the older ssh server on the Ebaz is running.
There are ways to add options to the ssh command line for this, but the most convenient thing is to add these lines to /home/tom/.ssh/config
# solve the "no matching host key type" error on old ssh server Host ebaz HostKeyAlgorithms=+ssh-rsa,ssh-dss PubkeyAcceptedAlgorithms=+ssh-rsa,ssh-dssAfter doing this I can:
ssh root@ebaz
First on the ebaz I do "ssh 192.168.0.80". Yes, this is to itself, but any host would do. We just want to force ssh to create the .ssh directory with proper permissions. We make the connection and logout. Now we see the .ssh directory and within it, the "known_hosts" file.
Next, on my desktop, I do this:
cd .ssh scp id_rsa.pub root@ebaz:Now that I have my public key on ebaz, I copy it to .ssh/authorized_keys. There was no file by this name, so it is OK to copy it, otherwise I would have had to be careful to append it and not overwrite other keys. I check permissions:
cd .ssh; ls -l -rw-r--r-- 1 root root 735 Dec 8 14:55 authorized_keysThis is correct, otherwise I would have used "chmod 644" to fix it.
And this works. Now I can do this without a password:
ssh root@ebazPerhaps someday I'll set up a "tom" user on the ebaz, but this is good for now.
Tom's Computer Info / [email protected]