LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-24-2009, 06:11 AM   #1
tulsi
Member
 
Registered: Aug 2009
Location: Chennai
Posts: 54

Rep: Reputation: 15
Question 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. ?

Last edited by tulsi; 08-24-2009 at 09:56 AM.
 
Old 08-24-2009, 07:07 AM   #2
pielas
Member
 
Registered: Jan 2009
Location: Poland
Distribution: Arch Linux
Posts: 50

Rep: Reputation: 17
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.
 
Old 08-24-2009, 07:24 AM   #3
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
hi

use vim -x filename.
 
Old 08-24-2009, 11:44 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your question get the exposure it deserves.
 
Old 08-25-2009, 12:11 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
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.
 
Old 08-25-2009, 07:28 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
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/
 
Old 08-25-2009, 12:18 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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.
 
Old 08-25-2009, 07:25 PM   #8
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
gpg -c <filename> to encrypt it

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 10:16 AM
LXer: #!*A5%amp;j9 - How to Encrypt Your File System LXer Syndicated Linux News 0 07-29-2009 09:10 PM
Encrypt/Decrypt file in Linux , How to ? shipon_97 Linux - Newbie 1 09-05-2007 04:35 AM
GPG wont encrypt file. acidblue Linux - Software 3 05-07-2006 06:05 PM
How to encrypt a password to the /etc/shadow file? Milosevic Linux - Newbie 2 12-13-2005 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration