In the 'Manage OpenPGP Keys' section of cPanel for one of my hosting accounts ('accname') I've just successfully imported a openPGP public key for a specific email address (let's call it [email protected]). If I navigate to /home/accname/.gnupg/ I can see some *.gpg files.
OK, now I want to test gpg by encrypting a test text file that I created and stored here
/home/accname/test.txt
Logging in as root, I navigated here:
/home/accname/
and entered the following command:
gpg -e -r [email protected] test.txt
But no luck: the error that came back was:
gpg: [email protected]: skipped: public key not found
gpg: test_message.txt: encryption failed: public key not found
Where am I going wrong? Why can't gpg find the public key for foo#bar.com? Am I supposed to specify the exact path to the /home/accname/.gnupg folder as an option in the gpg command (and if so, how - I've studied man gpg and can't work it out)?
All I want to do is to encrypt a plain text message on the server using gpg and my imported public key - I'm not bothered about trying to unencrypt.
I believe it's irrelevant, but I found the gpg command in two places on my server:
/usr/bin/gpg
/usr/local/bin/gpg
entering 'which gpg' at the command prompt tells me that /usr/local/bin/gpg is first choice.
Thanks very much for you help.
OK, now I want to test gpg by encrypting a test text file that I created and stored here
/home/accname/test.txt
Logging in as root, I navigated here:
/home/accname/
and entered the following command:
gpg -e -r [email protected] test.txt
But no luck: the error that came back was:
gpg: [email protected]: skipped: public key not found
gpg: test_message.txt: encryption failed: public key not found
Where am I going wrong? Why can't gpg find the public key for foo#bar.com? Am I supposed to specify the exact path to the /home/accname/.gnupg folder as an option in the gpg command (and if so, how - I've studied man gpg and can't work it out)?
All I want to do is to encrypt a plain text message on the server using gpg and my imported public key - I'm not bothered about trying to unencrypt.
I believe it's irrelevant, but I found the gpg command in two places on my server:
/usr/bin/gpg
/usr/local/bin/gpg
entering 'which gpg' at the command prompt tells me that /usr/local/bin/gpg is first choice.
Thanks very much for you help.