How to import pub keys with gnupg
I've been experimenting with gpg and have hit a little snag.
First I create two user accounts. A and B.
I logged in with A and did:
# gpg --gen-key
# gpg --export > pub_keys
I then did the same with B.
Next I tried to import A's public key
# gpg --import /home/A/pub_keys
But I get the error message:
gpg: Warning: using insecure memory!
gpg: packet(6) with unknown version 64
gpg:/home/A/pub_keys: key XXXXXXXX: no user id
gpg: Total number processed: 1
Then I log back into A and try to import B's public key.
# gpg --import /home/B/pub_keys
gpg: Warning: using insecure memory!
gpg: packet(6) with unknown version 64
gpg:/home/B/pub_keys: key XXXXXXXX: no user id
gpg: Total number processed: 1
The I try to encrypt a file so that only B can read it.
# gpg -r B -se file1
gpg: B: skipped: public key not found
gpg: file1: sign+encrypt failed: public key not found
So, where am I going wrong? It has to be a stupid error in the export or import. But where?
Also, why am I getting the insecure memory warning?
I read the FAQ, README and gpg man page that came with the .deb, and followed the instructions.
I thought they where pretty clear. Lots of examples, but I guess not clear enough.
Is there another doc I should check out?
Reply to: