C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Importing a Public Key
 

B.6. Importing a Public Key

— is just as simple as exporting keys. When you import someone's public key, you can decrypt their email and check their digital signature against their public key on your keyring.

One of the easiest ways to import a key is to download the key or save it from a website.

After downloading a key and saving it to the file key.asc, use the following command to add it to your keyring.

gpg --import key.asc 

Another way to save a key is to use a browser's Save As feature. If you are using a browser such as Mozilla, and you locate a key at a keyserver, you can save the page as a text file (go to File => Save Page As). In the drop-down box next to Files of Type, choose Text Files (*.txt)— but remember the name of the file you saved. For example, if you saved a key as a text file called newkey.txt, to import the file, at a shell prompt, type the following command:

gpg --import newkey.txt

The output will look similar to the following:

gpg: key F78FFE84: public key imported
gpg: Total number processed: 1
gpg:               imported: 1

To check that the process was successful, use the gpg --list-keys command; you should see your newly imported key listed on your keyring.

When you import a public key, you add that key to your keyring keyring.

Главная