summaryrefslogtreecommitdiff
path: root/website/bugs/headless-servers-take-too-long-to-generate-host-key.mdwn
blob: 8f1da5a4aff21c12bf84f957f46db578a5e4a682 (plain)

[[meta title="Running monkeysphere gen-key on a headless server takes way too long"]]

When i try to generate a key on a headless machine (no kbd, no mouse, no Human Input Device (HID) at all), monkeysphere gen-key hangs for a very long time (over an hour so far!) during the generation process, particularly at this point:

ms: generating server key...

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 197 more bytes)

And sure enough, there really is very little entropy in these systems at the time requested:

0 chomsky:~# cat /proc/sys/kernel/random/entropy_avail 
32
0 chomsky:~# 

It's not clear to me how to increase the entropy available to the kernel without an HID.

I've seen this happen on two machines now in the last week, and was able to resolve it on the first one by plugging in a keyboard and "massaging" it. This won't work for a machine that's out of physical range, and has no keyboard to be plugged in anyway.

One thing that might help is to suggest that the system administrator install a package like bsdgames and play console-based games as a non-privileged user, since that seems to feed the entropy count somewhat.