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
|