ssh key generation delays booting

  • Hallo,


    we purchased the armStoneA5 starter kit. Using buildroot I created a new root filesystem.
    In the config menu I chose remount root filesystem read-write during boot


    At the end of the boot process the system tries to generate ssh dsa and rsa keys which delays booting up to nearly 1 minute.



    We tried to remount the filesystem rw and generate these keys manually using


    But we didn't have success. I've also tried restoring the root filesystem using rootfs_std-fsvybrid-V1.0.ubifs from the fsvybrid-V1.0.tar.bz2 archive.
    What do I have to do to generate these keys and save them permanently in order to make the boot up delay disappear?
    Why is my root filesystem not mounted rw although I've chosen it in buildroot?


    Thank you very much!

  • I dont't know if it is the right solution, but I did the following to fix this problem. After boot I logged in as root and entered the following commands. First I mounted the filesystem read-write to enable storage of generated keys


    Code
    1. mount -o remount,rw /


    Then I executed the following commands from the startup script file /etc/S50sshd to generate the keys:


    Code
    1. /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
    2. /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
    3. /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''
    4. /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh_host_ecdsa_key -C '' -N ''


    This fixed the problem for me.

  • Yes, the easiest way is to remount rootfs as rw and restart the S50 script:


    Code
    1. mount -o remount,rw /
    2. /etc/init.d/S50sshd restart
    3. mount -o remount,ro /


    The next version will skip the key generation if the filesystem is read-only. Then booting will not be delayed and you can create the keys in the above way whenever you have time.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.