c7912dec2e61fb4d4e41b25da480e58905ae1bf4
[monkeysphere.git] / website / bugs / headless-servers-take-too-long-to-generate-host-key.mdwn
1 [[!meta title="Running `monkeysphere gen-key` on a headless server takes way too long"]]
2
3 When i try to generate a key on a headless machine (no kbd, no mouse,
4 no Human Input Device (HID) at all), `monkeysphere gen-key` hangs for
5 a *very* long time (over an hour so far!) during the generation
6 process, particularly at this point:
7
8         ms: generating server key...
9         
10         Not enough random bytes available.  Please do some other work to give
11         the OS a chance to collect more entropy! (Need 197 more bytes)
12
13 And sure enough, there really is very little entropy in these systems
14 at the time requested:
15
16         0 chomsky:~# cat /proc/sys/kernel/random/entropy_avail 
17         32
18         0 chomsky:~# 
19
20 It's not clear to me how to increase the entropy available to the
21 kernel without an HID.
22
23 I've seen this happen on two machines now in the last week, and was
24 able to resolve it on the first one by plugging in a keyboard and
25 "massaging" it.  This won't work for a machine that's out of physical
26 range, and has no keyboard to be plugged in anyway.
27
28 One thing that might help is to suggest that the system administrator
29 install a package like `bsdgames` and play console-based games as a
30 non-privileged user, since that seems to feed the entropy count
31 somewhat.