commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
command to decrypt:
openssl enc -aes-256-cbc -d < secret.tar.enc | tar x
Of course, don't forget to rm the original files ;) You may also want to look at the openssl docs for more options.
There are 2 alternatives - vote for the best!
Create an AES256 encrypted and compressed tar archive.
User is prompted to enter the password.
openssl enc -d -aes256 -in <file> | tar --extract --file - --gzip
"That command will encrypt the unencrypted-data.tar file with the password you choose and output the result to encrypted-data.tar.des3. To unlock the encrypted file, use the following command:"
openssl des3 -d -salt -in encrypted-data.tar.des3 -out unencrypted-data.tar
If you can do better, submit your command here.
You must be signed in to comment.