
Has anyone every tried to generate a GPG (or GnuPG) key? I have… and I received this error…
Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy! (Need 284 more bytes)
I was remotely logged into the machine (over SSH) so couldn't physically move the mouse or press keys to generate random entropy. The solution turned out to be simply running the following command in a second SSH Shell.
ls -R /
As soon as I ran that, the gpg command in the other window instantly finished creating my 2048 bit key.

8 Comments
You made my day! Thanks
You made my day! Thanks kindly for the great tip
Thanks for the tip! I got my
Thanks for the tip! I got my key finished almost instantly too!
It worked superbly !! Thanks
It worked superbly !! Thanks again
Fantastic :)
Fantastic :)
Simple and effective. Thanks!
Doesn't work -.-
Doesn't work -.-
Before(Need 284 more bytes)
After (Need 280 more bytes)
Thanks for the method. After
Thanks for the method. After researching the problem there are a few solutions it seems. I found this one earlier http://www.wiktip.org/entropy-gpg-key/ and that worked for me.
Likely your filesystem is too
Likely your filesystem is too small to generate enough entropy out of reading only the directory contents and metadata (which is all ls -R / will do) and you kernel may have most of the contents already cached. When I need to generate entropy on a remote VM guest, I typically will do something like:
find /var/ /usr /lib /srv -type f -print0 | xargs -0 cat > /dev/nullas the actual data contents of the filesystem will typically be larger than what the system is able to cache in memory, thus generating enough disk activity and entropy for whatever it is that I'm trying to accomplish.
We had the same issue of the
We had the same issue of the filesystem being too small alsp..
Running
md5sum /dev/sda &in the background a few times worked a charm!- Jamie
Add new comment