LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to Encrypt file (https://www.linuxquestions.org/questions/linux-software-2/how-to-encrypt-file-749816/)

tulsi 08-24-2009 05:11 AM

How to Encrypt file
 
How to create encrypt file in linux? I am try to ecryptfs command but display the error.
mount -t ecryptfs file file
I slected both openssl and passphrase. but finaly i got displays err mounting ecryptfs. what can i do?
already use crypt . but err occuring public key not found. ?

pielas 08-24-2009 06:07 AM

If you want to encrypt just one file use openssl or crypt. If you want to create encrypted container you can use crypted loopback or dm-crypt with loopback to file.

sem007 08-24-2009 06:24 AM

hi

use vim -x filename.

jschiwal 08-24-2009 10:44 PM

Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your question get the exposure it deserves.

jschiwal 08-24-2009 11:11 PM

The encryption supported by vim is very week. It is only intended to prevent another user from opening a plain text text file.

Here is an example of encrypting and decrypting a file using openssl:
openssl enc -cast-cbc -e -in ../enc.man -out enc.man.enc
openssl cast-cbc -d -in enc.man.enc -out enc.man

For more examples using openssl to encode files, read the "enc" man page. It lists the cyphers supported and there are a number of examples at the bottom.

H_TeXMeX_H 08-25-2009 06:28 AM

I personally use ccrypt:
http://ccrypt.sourceforge.net/

But if you have gpg installed you can also use that:
http://www.madboa.com/geek/gpg-quickstart/

anomie 08-25-2009 11:18 AM

I put together a quick howto on encrypting files using openssl, which should be included in your "base" system install.

GnuPG is another fine choice.

kdelover 08-25-2009 06:25 PM

gpg -c <filename> to encrypt it

gpg -d <filename>.gpg to decrypt the encrypted file :)


All times are GMT -5. The time now is 05:45 AM.