Skip to content

Instantly share code, notes, and snippets.

@pstaender
Created May 23, 2015 18:39
Show Gist options
  • Save pstaender/29648dab28ce1c6a10a4 to your computer and use it in GitHub Desktop.
Save pstaender/29648dab28ce1c6a10a4 to your computer and use it in GitHub Desktop.
Crypt and Decrypt tar gz folder (http://superuser.com/a/162628)
#!/bin/sh
# Encrypt
tar cz folder_to_encrypt | openssl enc -aes-256-cbc -e > out.tar.gz.enc
# Decrypt
openssl aes-256-cbc -d -in out.tar.gz.enc | tar xz
# Or using gpg
gpg --encrypt out.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment