Home > Uncategorized > Encrypting files with GPG (Gnu Private Guard)

Encrypting files with GPG (Gnu Private Guard)

February 3rd, 2010

-Create a text file with a secret phrase..

jesterj@jesterj-laptop:~$ cat > secret
donkey

-Encrypt file with password:

jesterj@jesterj-laptop:~$ gpg -c secret

-Verify file is encrypted:

jesterj@jesterj-laptop:~$ more secret.gpg
���(�U    �`�#.���ؖ-�$U

-Send to a different system, and test the file.

jesterj@jesterj-laptop:~$ scp secret.gpg jesterj@remotesystem:~
secret.gpg                                    100%   52     0.1KB/s   00:00

-Decrypt the file and enter passphrase.

jesterj@donkey:~$ gpg secret.gpg
gpg: CAST5 encrypted data
Enter passphrase:

-File is decrompressed:

jesterj@donkey:~$ more secret
donkey

Done!

soure: http://www.cyberciti.biz/tips/linux-how-to-encrypt-and-decrypt-files-with-a-password.html

Uncategorized

  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.