Use of GPG under Linux

Source: Internet
Author: User
Tags delete key gpg

a . Generate key

Gpg–gen-key

Two View Key

View Public key: GPG--list-key

View private key: GPG--list-secret-keys

Three Extract key:

Extract public key: Gpg-a--export newkey > Newkey.asc

Extract private key: Gpg-a--export-secret-keys newkey > Newkey_pirv.asc

Four Import Key

Import public or private key: GPG--import Newkey

Five To encrypt a file with a public key:

Gpg-ea-r newkey filename

The FILENAME.ASC encrypted file is generated

Six Decrypting with a private key

Gpg-o filename-d FILENAME.ASC

Enter the private key password

The FILENAME.ASC encrypted file can be decrypted into the filename file.

Seven Delete key

Delete private key

GPG--delete-secret-key Newkey

Remove Public key

GPG--delete-key Newkey

Use of GPG under Linux

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.