Use of gpg file encryption RHEL6

Source: Internet
Author: User

Side:

First, generate a pair of keys:

Prompt whether to generate2048Key pairs in bytes:

 

The steps for generating a key pair are as follows:

PressO"Key to start generating the key pair:

I am prompted to add a password to the key pair:

Input2Times

Then, the key pair characters need to be captured by pressing the keyboard or moving the mouse:

After that, let's check the key pair:

The configuration file and information of the key pair can be stored in:

After the key is generated, We need to export the public key of the key: After the key is generated, there will be one more directoryPub. keyFile:

We send this public key to the remote host:

End B:

BThe client will receive the public key:

The client imports the public key to the local machine:

Import failed: it may be that the time is not synchronized:

Check whether the import is successful:

After the import is complete, I use the public keyPasswdFile encryption:

Encrypted Files are generated by default:

Send the file to Client:

Check whether the message is received:

A decryption:

Client A has a private key.

We will be prompted to enter the password of the key pair:

Then you can see the file:

 

 

 

 

 

 

 

 

 

 

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.