gpg - cannot create key
I am trying to use gpg on RedHat 6.3, in order to encrypt / decrypt a file on the command line (ssh'ed into server).
I run the "gpg --gen-key" and I step through the menus taking the defaults. It then gets to a point where it says "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." it also briefly flashes a message that it can't connect to the agent. At this point the program hangs no matter what I do, and does not generate a key.
The same commands work well under RedHat 5.x (which is GNUpg 1.x, I believe).
gpg seems completely broken in RedHat 6.x..?
Any help would be greatly appreciated.
Responses
Try to set "GPG_TTY=/dev/tty" environment then execute gpg --gen-key command.
[test@example ~]# export GPG_TTY=/dev/tty
[test@example ~]# gpg --gen-key
I did a test on my virtual machine logging straight to the console, I noticed that it also took a while to return the shell, seems that it was hanged but in about 1 to 2 minutes it came back with the results. I'm not sure if it took a while due to my virtual machine limitations.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
