Giter Site home page Giter Site logo

Comments (4)

mhennerich avatar mhennerich commented on June 14, 2024 1

Thanks for pointing out. Good catch!
I have updated the EZ thread.

The RSA key is not included in the firmware. However dropbear is likely generating it while being started.
Let's copy all files and compute the md5.

from plutosdr-fw.

mhennerich avatar mhennerich commented on June 14, 2024

Can you check these files exist and that the md5sum match?

# cd /mnt/jffs2/etc/dropbear/
# ls
dropbear_ecdsa_host_key  keys.md5
# cat keys.md5 
13d398d305024806ccb75470b00b3efb  dropbear_ecdsa_host_key
# md5sum dropbear_ecdsa_host_key 
13d398d305024806ccb75470b00b3efb  dropbear_ecdsa_host_key
#

from plutosdr-fw.

fpw avatar fpw commented on June 14, 2024

I had the same problem. The cause is the following:

  • the stock firmware ships with /etc/dropbear/dropbear_rsa_host_key
  • /usr/sbin/device_persistent_keys generates /etc/dropbear/dropbear_ecdsa_host_key, so there are now two keys in /etc
  • it then does this in line 13: md5sum dropbear* /etc/dropbear/ 2>/dev/null > /mnt/jffs2/etc/dropbear/keys.md5
  • so now the keys.md5 file contains entries for both keys
  • however, in line 11 it only copied install -D ${KEYFILE} -t /mnt/jffs2/etc/dropbear
  • so now keys.md5 contains an entry for a file that isn't there
  • this leads to the MD5 check failing in/etc/init.d/S21misc
# cd /mnt/jffs2/etc/dropbear/
# ls
dropbear_ecdsa_host_key  keys.md5
# cat keys.md5
ac63201202b9e78fcc43170a32bce0fa  dropbear_ecdsa_host_key
656c2fd8f5e0b41a4897d6e8ee2943a3  dropbear_rsa_host_key
# md5sum -c keys.md5
dropbear_ecdsa_host_key: OK
md5sum: can't open 'dropbear_rsa_host_key': No such file or directory
dropbear_rsa_host_key: FAILED
md5sum: WARNING: 1 of 2 computed checksums did NOT match

To fix this, I think either both files should be copied to /mnt/jffs2/etc/dropbear or, if the RSA key is obsolete, it should be deleted by the script before generating the MD5 file.

As a workaround for the user, you can do this to fix it:

# cd /mnt/jffs2/etc/dropbear/
# cp /etc/dropbear/dropbear_rsa_host_key .
# md5sum dropbear_* > keys.md5
# md5sum -c keys.md5
dropbear_ecdsa_host_key: OK
dropbear_rsa_host_key: OK

Another report for the same issue, I can't reply there due to not having an account: https://ez.analog.com/adieducation/university-program/f/q-a/541846/pluto-sdr-persistent-ssh-keys-command-failing-on-fimrware-0-32

from plutosdr-fw.

mhennerich avatar mhennerich commented on June 14, 2024

FYI: analogdevicesinc/buildroot#68

from plutosdr-fw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.