April 19, 2024

EBAZ4205 Bitcoin miner board - ssh

We have our board on the local network.
We can ping it.
We can start telnetd, then telnet to it.

An ssh server is running. The "ps" command shows us:

/usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B
But 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-rsa
I 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-dss
After doing this I can:
ssh root@ebaz

What about keys?

I have notes on this here: Using keys is both more secure and very handy if you plan to use ssh a lot. More than anything, I am just curious to see if "dropbear" on the Ebaz will support this.

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_keys
This 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@ebaz
Perhaps someday I'll set up a "tom" user on the ebaz, but this is good for now.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org