Not enough random bytes available. [GPG Signing]

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:

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:

find / > /dev/null

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

Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter

Thoughts on this post

Leave a comment?

Leave a Reply