I set up my Pi, and I get output to a screen / keyboard working etc.

However, when I run raspi-config, and pick the SSH option I get

Initial ssh key generation still running. Please wait and try again.

I left the Pi on for a few hours but this didn't help.

I tried bashing on the keyboard for a while as I assume this is due to insufficient entropy.

Is there a way to fix this??

  • Can you just generate the keys manually? – Jivings Jul 27 '12 at 8:37

The advice in the Raspberry Pi forum thread (rm /var/log/regen_ssh_keys.log) got the raspi-config to make it look like it had worked, but the host keys weren't generated. I fixed this by doing

sudo rm /etc/ssh/ssh_host*
sudo ssh-keygen -A

the rm was needed as otherwise ssh-keygen was seeing the 0 length files as valid keys

If this doesn't work, try removing the log file:

rm /var/log/regen_ssh_keys.log
  • I have tried this multiple times, including reboots with no luck. Advanced > ssh still says 'Initial ssh key generation still running. Please wait and try again.' Also, after that message I get 'There was an error running option A4 SSH' I am running the Raspbian 2015-02-16 image – Roger Mar 4 '15 at 15:55
  • I wiped the SD card and imaged it again with Raspbian. This time I made the ssh change on the initial boot up. Odd, annoying, but working now. – Roger Mar 4 '15 at 16:23
  • 3
    Removing the log file rm /var/log/regen_ssh_keys.log is the keystep. If you remove it and then follow the steps you will be able to setup the ssh again. – Senthil Kumaran Apr 28 '15 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.