Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    448

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

    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.
    • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia

  2. #2
    Registered User deev's Avatar
    Join Date
    Mar 2006
    Location
    Adelaide, Australia
    Posts
    1

    Default 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

Similar Threads & Tags
Similar threads

  1. SSH - public key- cpanel - Ubuntu
    By dramos in forum New User Questions
    Replies: 3
    Last Post: 09-29-2010, 02:42 AM
  2. Authentication cPanel with public key
    By rdsdesign in forum cPanel Developers
    Replies: 8
    Last Post: 06-16-2010, 08:52 AM
  3. PUBLIC GnuPG key Installation
    By 8p-design in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-28-2009, 02:53 PM
  4. ssh public/private key log in failure
    By johnnywalker in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-23-2007, 05:03 PM
  5. Problem deleting public key from GnuPG
    By wineo in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-15-2004, 10:27 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube