default user and recipient

Ville Määttä mailing-lists at asatiifm.net
Sat Aug 30 17:17:35 CEST 2014


You'll need to import the other person’s public key as that is what you are encrypting to.

If the other person has uploaded their key to a key server you should be able to find it there:

gpg --search-key recipient at example.com

If you already know, preferably the long form, key ID you can just use:

gpg --recv-keys 6C70228BDC779E9A

If their key is not the key server network there are other options (LDAP, DNS etc.) or they could email you their public key. If it’s in a file:

gpg --import filename.asc

Ok, you’ve got the key imported and then it’s just:

gpg -e filename

or directly:

gpg -r 6C70228BDC779E9A -e filename

> I have not uploaded my newly created key information to a keyserver,  Is that a requirement?

Nope. That might for example help others find your key and encrypt to that.

PS. Remember to replace the ID from those examples.

-- 
Ville

On 29 Aug 2014, at 23:05, Herb Burnswell <herbert.burnswell at gmail.com> wrote:

> Sorry.  I found the default-recipient parameter in the ~/.gnupg/gpg.conf file.  However, when I set:
> 
> default-recipient-self
> 
> I receive:
> 
> No such user ID.
> 
> I have not uploaded my newly created key information to a keyserver,  Is that a requirement?
> 
> TIA,
> 
> Herb
> 
> ---------- Forwarded message ----------
> From: Herb Burnswell <herbert.burnswell at gmail.com>
> Date: Fri, Aug 29, 2014 at 12:50 PM
> Subject: default user and recipient
> To: gnupg-users at gnupg.org
> 
> 
> All,
> 
> I am new to pgp and would like to understand the minimum flags that I should be using for my encryption/decryption needs.  I just want to encrypt files for decryption by one other person.  We have exchanged public keys.
> 
> I have read in several places that I can run:
> 
> gpg -e filename
> 
> However I receive:
> 
> You did not specify a user ID. (you may use "-r")
> 
> Current recipients:
> 
> Enter the user ID.  End with an empty line:
> 
> Questions:
> 
> 1. Can I set default behavior to not have to specify a user ID?
> 2. What other flags should be used per best practices?
> 
> Any guidance is greatly appreciated,
> 
> Herb
> 
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20140830/03f9c592/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 630 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: </pipermail/attachments/20140830/03f9c592/attachment.sig>


More information about the Gnupg-users mailing list