LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-23-2012, 04:27 AM   #1
ksaad
LQ Newbie
 
Registered: Nov 2011
Posts: 7
Blog Entries: 1

Rep: Reputation: Disabled
How to encrypt a file


Hi,

I used crypt command, the meassage is can not encript a file
then I did $ man crypt and it is there as a function
$ cat filename|crypt > filename.cpy --> does this works, I haven't tried.

it looks like crypt command is not working as an old verion of OSS.
 
Old 12-23-2012, 08:27 AM   #2
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Why not use gpg instead?

$ gpg -c -o output-file input-file
[enter password]

Done.
 
Old 12-23-2012, 08:35 AM   #3
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Perhaps it won't encrypt a text file without a password. Not sure.
 
Old 12-23-2012, 12:34 PM   #4
adampski
Member
 
Registered: Dec 2012
Posts: 37

Rep: Reputation: Disabled
You want to encrypt a file without a PW?

http://www.youtube.com/watch?v=0pQ0ME_M4g8

You often need a key (password) for most encryption methods. Whether they're public or private.
 
Old 12-23-2012, 01:21 PM   #5
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
crypt is typically used to generate an encrypted (hashed) password, not to do file encryption. As suggested, check into gpg (GnuPG).
 
Old 12-25-2012, 04:42 AM   #6
ksaad
LQ Newbie
 
Registered: Nov 2011
Posts: 7

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
how to encript a file

Hi,

I'll check gpg and let you know. Thanks
 
Old 12-25-2012, 08:27 PM   #7
codergeek
Member
 
Registered: Dec 2012
Posts: 52

Rep: Reputation: 7
I've used a program called ccrypt( not to be confused with crypt ) to encrypt files. That was then. Today, I use cryptsetup on a usb stick. All I do is insert the usb stick and a dialog box opens and prompts me for the passphrase. Then I just add the files I want to keep secured.

Last edited by codergeek; 12-25-2012 at 08:29 PM.
 
  


Reply



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
How to encrypt a single file for... ? dedeco Linux - Newbie 7 09-16-2010 01:43 AM
crypt() perl function to encrypt Password in shell scripts or How Encrypt passwords ? balakrishnay Linux - General 13 01-14-2010 09:35 AM
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 09:16 AM
How to Encrypt file tulsi Linux - Software 7 08-25-2009 06:25 PM
Encrypt/Decrypt file in Linux , How to ? shipon_97 Linux - Newbie 1 09-05-2007 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 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
Open Source Consulting | Domain Registration