Skip to content

Instantly share code, notes, and snippets.

@eggman64
Last active November 28, 2018 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggman64/a4a23a3fb9be4fc2ef759368785cdd4b to your computer and use it in GitHub Desktop.
Save eggman64/a4a23a3fb9be4fc2ef759368785cdd4b to your computer and use it in GitHub Desktop.
encrypt tarball with openssl
# Encrypt
tar cz folder_to_encrypt | \
openssl enc -aes-256-cbc -e > out.tar.gz.enc
# Decrypt
openssl enc -aes-256-cbc -d -in out.tar.gz.enc | tar xz
# Consider using -pbkdf2 instead of -aes-256-cbc for slower but more secure encryption
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment