2013/09/13

Generating GPG Keys on CentOS 6

I recently ran into an issue where I was having problems creating a new set of GPG keys on a CentOS host that I was using.  Here is the process that eventually worked for me.

1. Run the following gpg-agent command:

gpg-agent --daemon --use-standard-socket --pinentry-program /usr/bin/pinentry-curses


2. Run the following rngd command to ensure there is enough entropy being generated:

sudo rngd -r /dev/urandom


3. Finally run the gpg command to generate the key:

gpg --gen-key


If you are running the gpg-agent as root you may run into other issue that prevent you from completing the process.  It is best to run as a non-root user.

Nate