Creating encrypted archives

To create an encrypted archive of thedirectory, using des3 encryption, to produce a file called thearchive.tgz.des3 which is protected by thepassword:

tar -cz thedirectory | openssl des3 -salt -out thearchive.tgz.des3 -pass pass:thepassword

To decrypt and extract the archive:

openssl des3 -d -in thearchive.tgz.des3 -pass pass:thepassword | tar -xz

In both cases, remove the -pass pass:thepassword if you want to be prompted for the password.

Last modified: 17/11/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top