The content of this document may be incorrect or outdated.
PGP: Sending Encrypted Files from a Terminal
How do I send encrypted Email?
Sending encrypted e-mail with PGP is a four step process, consisting of the following steps:
- Create the message that you wish to send.
- Get the public key of the person to whom you're sending the message.
- Encrypt the message using that person's public key.
- Send the encrypted message via your traditional electronic mail program.
Creating the message:
You can create the message with a word processor (Be sure to save it as an ASCII file though.) The best way is to use a UNIX editor of your choice.
Getting the Recipient's Public Key:
Before you encrypt your message, you need to be sure that you are encrypting it with the correct public key for the person to whom you're sending the message. Encrypting a message with wrong key can lead to two undesired consequences:
- The intended recipient won't be able to read the message.
- Someone else might be able to read the message instead.
Encrypting the Message:
Once you have a key, you can use it to encrypt a message. To encrypt a message to send over e-mail channels use must use the -eat option.
EXAMPLE: % pgp -eat message jdoe ---> Will produce file 'message.asc'
In the above example, message is the name of the file to be encrypted, and "jdoe" is sufficient to identify the user ID for John Doe (the recipient).
Sending the Message:
Once you have successfully encrypted your message, you can send it to its intended destination. The way to do this is by using the command line mail command.
EXAMPLE: % mail jdoe@ecn < message.asc
Resources used for this FAQ:
Garfinkel, Simson. Encryption for Everyone: PGP Pretty Good Privacy. O'Reilly & Associates, Inc. 1995. ISBN 1-56592-098-8.
Last modified: 2015/04/21 10:44:36.817609 GMT-4 by
Created: 2007/11/06 13:42:40.163000 US/Eastern by brian.r.brinegar.1.
Type in a few keywords describing what information you are looking for in the text box below.