What Is the Command Line Syntax to Generate a Revocation Certificate?
In Ubuntu, users use the gpg command to proceed data safe and protect their privacy. The gpg is an acronym for "GnuPrivacy Guard". It encrypts your files securely and then that simply the specified receiver can decrypt those files. GPG is based on the concept of each user having two encryption keys. Each individual tin take a pair of public and private keys.
Utilizing GPG encryption to encrypt your data before its transfer assures that no i without a valid matching cardinal pair can view or read it. Yous tin encrypt a file with your individual central and the recipient'southward public key to send it securely. Then, the recipient will decrypt the received file using their individual key and your public key. This concept demonstrates that public keys must be shared for the successful decryption of any file. Making your public keys just that "public" does not bring any risk to your organization. It is obligatory to go on private keys "private". If your public key is bachelor to the public, your private key must be kept individual and secure.
In this commodity, we will hash out how to apply the gpg command on Ubuntu. Then let'southward first!
How to install gpg on Ubuntu
To install gpg on your Ubuntu organization, open up your final by pressing "CTRL+ALT+T". Yous can also search it manually in the Application'south search bar:
Update the repositories of your Ubuntu by using the beneath-given control:
Next, utilize this control for the installation of gpg:
$ sudo apt-get install gnupg
Enter "Y/y" to permit the installation procedure to continue:
To confirm the beingness of gpg, execute the beneath-given control. The execution of this command will also list out the supported algorithms, gpg syntax, and available options:
How to utilize gpg command to generate primal pair on Ubuntu
Later successful installation of gpg on your Ubuntu, motility forward to generate a gpg central pair. The gpg keypair will have a public and private key. A private key is the master key of your organization. It enables you to encrypt and decrypt files as well as create signatures with it. The public key is shared with the individuals you want to view and access your files or data encrypted with the private key. Public cardinal also helps verify if the encrypted data is sent from your organisation or non.
Write out the beneath-given in your Ubuntu final for generating primal pair:
Enter your name and email address in the terminal. After that, enter "O". to proceed forward:
A prompt window volition appear request you lot to enter some passphrase to protect the primal pair:
Execution of the above-mentioned command will store some information on your arrangement which comprises your real proper noun and Email address. Subsequently you have confirmed that the entered information is right, gpg control will generate a fundamental pair: a public and private fundamental, a fingerprint of the user, and a revocation document:
How to use gpg command to generate revocation certificate on Ubuntu
If unknown outsiders discover your private key, you must disaffiliate the sometime keys and regenerate the key pair. For this procedure, you will need a revocation certificate. In the below-given example, we will generate a revocation certification and store it safely on our Ubuntu.
In the gpg control, add the "–output" option with a filename. This option will shop the revocation certificate in the specified file. Next, the "–gen-revoke" option is added to generate the revocation document and at the end of the gpg control, write out the email address that you have entered previously for generating central pair:
$ gpg --output ~/revocation.crt --gen-revoke [electronic mail protected]
When yous execute the command mentioned above, the system volition ask you lot if you generate the revocation certificate. Write out "Y" and press "Enter". Afterward that, you have to specify the reason for generating the certificate. You tin select betwixt the available options, in this case, we will specify the reason equally "Key has been compromised" represented by option "1". Then, we will ostend the changes we made by entering "y". In the cease, the system volition ask you to enter the passphrase you saved when generating the central. Enter your passphrase, and Ubuntu is all set up to generate the revocation certificate:
Subsequently generating the revocation certificate, we will conform file permissions past using the "chmod" command:
$ sudo chmod 600 ~/revocation.crt
To ostend the practical file permission changes, listing out the files and look for the file permissions of the "revocation.crt" file":
The output declares that only we can use the certificate that comes under an platonic situation:
How to use gpg command to verify a public key on Ubuntu
In some cases, you may desire to verify the public central shared by someone. The "gpg" control can also perform this operation with the help of the "–fingerprint" pick. By adding "–fingerprint", the gpg command will generate a sequence comprising tens of sets of four hexadecimal characters. You lot can compare the generated key with the fingerprint of the other person'southward key. If both become matched, and so the public key of that person is verified:
$ gpg --fingerprint [email protected]
How to employ gpg control to export your public key on Ubuntu
Want to share your public key with someone? For this, you will need to export your fundamental from the local store of gpg as a file. This functioning is performed using the "–consign" choice in the gpg command in combination with the email address you lot entered at the time of generating the primal pair. The "–output" pick can be added to consign the central in the file specified with it. Instead of generating a binary file, the "–armor" option instructs the gpg command to generate ASCII armor output:
$ gpg --output ~/sharqa.central --armor --export [email protected]
Now, view the content of the generated "sharqa.primal" file:
Here information technology is!
You tin can also export your public key using the beneath-given command:
$ gpg --armor --consign [email protected] > public_key.asc
How to employ gpg command to send your public fundamental on Ubuntu
You lot can likewise utilize a public key server for sharing your public cardinal. The fundamental is sent to the key server using the "–send-keys" option in the gpg command. With the "–key-server" selection, you have to add the web accost of the public key server. At the end of the control, add together the fingerprint of your key, which you generated earlier using the "–fingerprint" option.
Notation: You have to enter the fingerprint of your fundamental without any infinite
$ gpg --transport-keys --keyserver pgp.mit.edu 82B0776A001C001C6ABB7B4C687783685445C0A1
Conclusion
Privacy is always the main business organization for any computer user. Everyone wants to continue their data secure while sharing it with another user. In Ubuntu, gpg command makes information technology simple to encrypt your files with uncommonly powerful encryption. We have talked virtually how to use the gpg command on Ubuntu in this article. The procedure of gpg installation, generating key pair and revocation certificate, exporting, and sharing public is also included. Moreover, we have also shown how to verify the public central of the file recipient.
Source: https://linuxhint.com/gpg-command-ubuntu/
0 Response to "What Is the Command Line Syntax to Generate a Revocation Certificate?"
Post a Comment