The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

gpg: public key not found - how to tell gpg where to find the public key?

Discussion in 'General Discussion' started by spaceman, Nov 26, 2003.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    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 foo@bar.com). 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 foo@bar.com test.txt

    But no luck: the error that came back was:

    gpg: foo@bar.com: 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.
     
  2. deev

    deev Registered

    Joined:
    Mar 6, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Adelaide, Australia
    GPG encryption

    I am currently trying to encrypt form data using GPG to be sent to an email address. However am limited by the fact that this is being done using our ISP's web server which has cPanel installed (and no SSH access). I created the certificates using cPanel but can't seem to get gpg to encrypt a test text file using a simple php script. ANY help would be appreciated!

    Will happily provide the PHP scripts I've been using if anyone wants to see what I've done so far...

    Steve
     
Loading...

Share This Page