Not enough random bytes available. [GPG Signing]

02 Sep 2011 in TIL

I'm currently following this awesome guide on how to set up encrypted Amazon S3 backups from a server. The first thing it asks you to do is to generate a GPG key. It was all going well until the following message came up:

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

You can see the available entropy on a system by using the following command:

bash
watch cat /proc/sys/kernel/random/entropy_avail

In my case, it did not seem to be increasing much, no matter how many times I ran dmesg, pinged google or listed a directory's contents. I needed to find something with much more data throughput. The following did the trick:

bash
find / > /dev/null

No sooner had I started the command, the GPG key generation finished and I could carry on installing Duplicity :)