1833465 Members
2876 Online
110052 Solutions
New Discussion

Encript Text File

 
SOLVED
Go to solution
Ricardo Bassoi
Regular Advisor

Encript Text File


Hi All,

I have a txt file < filename.csv > and I want to do:
1- Encript the file
2- Send by FTP to other machine ( This I know )
3- Remove the encript from the file

The solution to encript must be fast and secure.

Tks,

Bassoi
If you never try, never will work
5 REPLIES 5
MANOJ SRIVASTAVA
Honored Contributor

Re: Encript Text File

Hi Ricardo

Couple of ways to do it

1. uuencode
2. do a tar cvf the fiel to some other file name
3. ftp that file
4. untar it


Manoj Srivastava
Jeff Schussele
Honored Contributor
Solution

Re: Encript Text File

Hi Ricardo,

Take a look at the crypt command for simple encryption/decryption scheme.

man crypt (1) & (3C)

Takes standard input & writes standard output & uses a "password" as a key where password can be as simple as three lower case chars which can be passed to the recipient in a secure fashion or used by yourself after the ftp arrives.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: Encript Text File

Use "crypt" command .. for example ..

# crypt < data > data.secret
Enter key:
# ll data.secret
==> transfer data.secret over

To encrypt .. (on the other side)

# crypt < data.secret > data.txt
Enter key:
# ll data.txt
# cat data.txt

The Enter key part allows you to kindda put in a "password" before you encrypt it and de-crypt it.
SHABU KHAN
Trusted Contributor

Re: Encript Text File

Ricardo,

Use the crypt command:

To encrypt simply pipe the STDOUT of
the file to "crypt" and redirect it to
a new file name. Enter a passowrd when
prompted with "Enter key".

$ cat foo | crypt > foo.e
Enter key:

To unencrypt simply pipe the STDOUT of
the encrypted file to "crpyt" and
redirect it to a new file name. Enter
a passowrd when prompted with
"Enter key".

$ cat foo.e | crypt > foo.new
Enter key:

Hope this helps !

Thanks,
Shabu
Ricardo Bassoi
Regular Advisor

Re: Encript Text File


Thanks to All,

Special thanks to Jeff, Chan and Shabu ! You got a 10 !



If you never try, never will work