Operating System - HP-UX
1819870 Members
2544 Online
109607 Solutions
New Discussion юеВ

How to encrypt the content while you tar or gzip something?

 
Donald23
Occasional Advisor

How to encrypt the content while you tar or gzip something?

Sometime I need give some password when tar or gzip something like "ZIP" on MS-Windows OS.
Does anybody know how to put it into reality?
Donald
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: How to encrypt the content while you tar or gzip something?

You might want to get a product like pgp pretty good privacy from http://www.pgp.com

You'd be best to simply post the file on a non-anonymous ftp server and require a user id and password to download.

Even better, secure ftp, which comes with HP Secure Shell(port of openssh).

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Donald23
Occasional Advisor

Re: How to encrypt the content while you tar or gzip something?

secure FTP??
U might mis-understand me or I mis-understand you. :)

I have some file important. I wanna leave them on HP-UX server. If I leave them there originally, everybody can see the files such as source code. So, I should gzip them and only correct password can un-gzip them.
This is my question.
My understanding is I should install some special SW to have such a function, right?
Donald
RAC_1
Honored Contributor

Re: How to encrypt the content while you tar or gzip something?

crypt < "your_file" > cryped_file.

This will ask you for password, keyin the password you want.

You may further tar/gzip this file.

For uncrypting the file.

crypt < "crypted_file" > uncrypted file


There is no substitute to HARDWORK
James A. Donovan
Honored Contributor

Re: How to encrypt the content while you tar or gzip something?

If you just want something simple, then take a look at the crypt command. The key could be cracked by someone who wants to go to a little effort, but the same is true of the windows-based ZIP passwords.

$ man crypt
Remember, wherever you go, there you are...
Patrick Wallek
Honored Contributor

Re: How to encrypt the content while you tar or gzip something?

If you are concerned with peopel reading or looking at files they shouldn't why not just use basic unix security? Set the permissions on the files to be read-only for the owner of the file and then create an id that no one has the password and change the ownership of those files, and the directory those files are in, to that id?

You can very easily lock down the files so that they can not be viewed by your average user on the system.
Mark Grant
Honored Contributor

Re: How to encrypt the content while you tar or gzip something?

Why don't you just get "zip" from

http://hpux.connect.org.uk/hppd/hpux/Misc/zip-2.3/

and zip with the "-e" option to add a password.
Never preceed any demonstration with anything more predictive than "watch this"
Lisa Sorbo
Frequent Advisor

Re: How to encrypt the content while you tar or gzip something?

if you use the referenced Zip -e to password protect - I assume the Windows user unzipping with winzip or pkzip will be able to supply the same password and unzip it?
Can the password be passed to the UNIX Zip process with a environment variable or source file rather than a terminal prompt?