Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications


GPG stands for GNU Privacy Guard and is GNU’s tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility.

See  how to use gpg tool?


Create file


root@user:~# vim test.txt (write something there)


This is test file.


Im going encrypt it with gpg


:wq! (save and exit file)


see the file content with

root@user:~# cat test.txt



Now we are going to Encrypt the file with gpg


root@user:~# gpg -c test.txt

Enter Pass-phrase : <YOUR-PASSWORD>

Repeat Pass-phrase : <YOUR-PASSWORD>



You can see one more file create.


root@user:~# ls -l test*

-rw-rr 1 root root 59 2011-03-02 17:20 test.txt

-rw-rr 1 root root 97 2011-03-02 17:23 test.txt.gpg



Lets try to see encrypt file with cat command


root@user:~# cat test.txt.gpg


i+`P$@CoEkW%>o

8*zbB`EA9{7

IW


you can see like this



Delete original File

root@user:~# rm test.txt



Now we are going to decrypt the file


root@user:~# gpg test.txt.gpg

Enter Pass-phrase : <YOUR-PASSWORD>


see decrypted file content


root@user:~# cat test.txt





Rate This Article: poorexcellent
 
Comments about this article
thanks
writen by: kaaliakahn on 2011-04-18 15:59:38
It would be great if Sankit you or somebody write a nice tutorial on encrypting using public key.
RE: thanks written by kaaliakahn:

Comment title: * please do not put your response text here