To encrypt data to a specific person, you need to encrypt it with their public key. Prior to encrypting to the public key, the key must be imported to your keyring first. To get a public key onto your keyring, you must either find the public key on a keyserver or receive the public key file from the recipient and then import it onto your keyring.
To import a key to your keyring, you use the --import variable. The file containing the key(s) to be imported should be in the current directory, or you must specify the fully qualified path to the file containing the keys. Note that both private and public keys will be imported, if they exist in the file. If a key being imported already exists in the local keyring, the keys are merged.
Usage:
pgp --import <keyname.asc> [options]
The following options are available with the --import variable.
--import-format specifies the import format for the current operation. See --import-format for more information.
--manual-import-keys changes the behavior of PGP Command Line when keys are found during import operations. The default is all.
--manual-import-key-pairs changes the behavior of PGP Command Line when key pairs are found during an import operation.
--passphrase is the passphrase of the key being imported.
--new-passphrase is the new passphrase of the bundle key being imported.
--local-user is the key ID of an existing bundle key.
To import a key to your keyring, you use the --import variable. The file containing the key(s) to be imported should be in the current directory, or you must specify the fully qualified path to the file containing the keys. Note that both private and public keys will be imported, if they exist in the file.
Here are some methods to import a PGP public key and add it to your keyring: Double-clicking the file on your system. If PGP Encryption Desktop recognizes the file format, it opens and asks if you want to import the key(s) in the file. Choosing to import the key file in PGP Encryption Desktop.
In the GPG Keychain menu at the top, click on Import. Several options are available to import the OpenPGP public key: Directly go to File in the menu bar and choose Import…. In the dialog box that appears, navigate to the saved location of your OpenPGP public key file, select it, and click Open.
Select PGP Keys in the control box and click the keyring that contains your key. Right-click on the key you wish to submit, then click Copy Public Key.Open a Web browser and type the following address keyserver.pgp.com.Click the link Publish Your Key.
How to Generate Keys on the PGP Command Line: Use the --gen-key command to create a new key pair. <user> is a user ID that people can use to locate your public key. A common user ID is your name and email address in the format: "Alice Example <alice@example.com>".
A public key may be added to your public keyring with the --import option. Once a key is imported it should be validated. GnuPG uses a powerful and flexible trust model that does not require you to personally validate each key you import. Some keys may need to be personally validated, however.
Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.