Trying to generate a key for a server.
gpg --gen-key
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
and it just hangs there.
There is another error:
can’t connect to `/root/.gnupg/S.gpg-agent': No such file or directory
which seems to go away after:
gpg-agent –daemon
GPG_AGENT_INFO=/tmp/gpg-4c5hyT/S.gpg-agent:1397:1; export GPG_AGENT_INFO;
#GPG_AGENT_INFO=/tmp/gpg-4c5hyT/S.gpg-agent:1397:1; export GPG_AGENT_INFO;
gpg --gen-key
...
but again, it hangs at “…gain enough entropy”.
There are no “++++++++++++++++++++++++++++++++++++++++++”‘s which from forum posts looks like should be expected as the key is generated.
I have tried reinstalling the package, but seemingly everything depends on gpg.
I’ve read other people having problems with this on centos 6 too (whereas centos 5 works fine).
There is nothing remarkable in /var/log/*
.
Any ideas on where to go from here?
Thanks.
Anytime I’ve seen it (gpg –gen-key) hang like this, I log in to another shell and start a “dd if=/dev/sda of=/dev/zero” and it takes off after a few seconds / minutes.
Check more discussion of this question.