VisionFive 2 Debian Image Released

I just noticed that every image has the exact same public and private ssh hosts keys. These should be unique on every machine (in theory it could allow a man-in-the-middle attack since your private host ssh key is public, but in reality most people are only a few feet/meters away from their board, so the odds of an actual MITM attack are basically zero).

But you might want to delete the following files:

/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_ecdsa_key
/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_host_ed25519_key
/etc/ssh/ssh_host_ed25519_key.pub

e.g.
$ sudo rm -i /etc/ssh/ssh_host_*
And then run the following command to create new unique ssh hosts keys known only to your machine:
$ sudo /usr/bin/ssh-keygen -A

Oh and on the client you use to ssh to the VF2 remove the old ssh hosts (public) keys
$ ssh-keygen -R insert_visionfive2_ip_address_here

2 Likes