14

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??

John Palmer
  • 341
  • 2
  • 10

1 Answers1

10

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
ssundarraj
  • 103
  • 4
John Palmer
  • 341
  • 2
  • 10
  • 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 04 '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 04 '15 at 16:23
  • 4
    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 05:46