[kanchilug] [Tip] Simple Encryption in command line

  • From: "Tha.Suresh" <jemenisuresh@xxxxxxxxx>
  • To: ILUG-C <ilugc@xxxxxxxxxxxxx>, KanchiLug <kanchilug@xxxxxxxxxxxxx>, ilug-bengaluru@xxxxxxxxxxxxxxxx, puduvailug@xxxxxxxxxxxxx, Linux Delhi <iitdlug@xxxxxxxxxxxxxxxx>, Linux Delhi <ilugd@xxxxxxxxxxxxxxxxxxxxx>, Mlug <glug-meerut@xxxxxxxxxxxxxxxx>
  • Date: Fri, 24 Jun 2011 13:35:43 +0530

Simple Encryption in command line

To encrypt single file, use command gpg as follows:


*$ gpg -c filename*


Output:

Enter passphrase:*<YOUR-PASSWORD>*
Repeat passphrase:*<YOUR-PASSWORD>*

This will create a *filename.gpg* file.


*Option:*

   - *-c :* Encrypt with symmetric cipher.

Caution if you ever forgot your password aka passphrase, you cannot recover
the data as it use very strong encryption.


more info: http://www.gnupg.org/gph/de/manual/r1023.html


Ex:

To Encrypt:
[suresh@mercury Desktop]$ gpg -c test.rb
Enter passphrase:
Repeat passphrase:

To Decrypt:

[suresh@mercury Desktop]$ gpg test.rb.gpg
gpg: CAST5 encrypted data
Enter passphrase:






-- 
Warm Regards,
Tha.Suresh


My experiences with Linux:  http://thasulinux.wordpress.com
Cooool Linux Tips & Tricks: http://gnutips.wordpress.com
Free/Open Source Jobs:      http://fossjobs.in

Other related posts:

  • » [kanchilug] [Tip] Simple Encryption in command line - Tha.Suresh