Subject: bug#34580: Service ssh-daemon could not be started

From: Andreas Enge <[email-masked]>
Date: Thu, 21 Feb 2019 00:08:07 +0100

On Wed, Feb 20, 2019 at 05:51:54PM -0500, Leo Famulari wrote:
> On Wed, Feb 20, 2019 at 11:48:02PM +0100, Andreas Enge wrote:
> > I suppose so. I would be happy to provide further information, but there is
> > not much to see in the log files.

I grepped for "ssh" in /var/log/messages.

The failure on boot:
Feb 19 22:02:20 localhost vmunix: [    6.712592] random: ssh-keygen: uninitialized urandom read (32 bytes read)
Feb 19 22:02:10 localhost sshd[359]: Server listening on 0.0.0.0 port 22.
Feb 19 22:02:25 localhost shepherd[1]: Service ssh-daemon could not be started.

And then starting by hand:
Feb 19 22:03:48 localhost sshd[380]: Server listening on 0.0.0.0 port 22.
Feb 19 22:03:48 localhost sshd[380]: Server listening on :: port 22.
Feb 19 22:03:48 localhost shepherd[1]: Service ssh-daemon has been started.

It looks as if ssh-keygen takes too long; this is called from
openssh-activation in services/ssh.scm, with a comment
"Generate missing host keys". Are these regenerated at each boot?
If yes, is there a race condition, one action not waiting for the
previous one to finish?

Andreas