Use Gnupg to encrypt files in Linux

Source: Internet
Author: User
Tags gnupg

Use Gnupg to encrypt files in Linux
GuideGnuPG (GNU Privacy Guard or GPG) is an open source code for encryption or signature released with the GNU General Public License, which can be used to replace PGP. Most gpg software only supports the command line method, which is hard to grasp. Because gpg software is open source code, it is difficult to hide backdoors, so it is safer than pgp and other commercial software.

1. Create alice and bob users and set the password in the test machine.

2. Switch to alice user and generate the key/Public Key


3. Switch to bob and generate it again.

4. Export bob's public key in ASCII format

5. Switch to user alice and import bob's public key and encrypt the file.


6. Use bob's private key to decrypt the file.


This article Reprinted from: http://www.linuxprobe.com/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.