Encrypt and decrypt files with openssl

If you need easy way to encrypt and decrypt files on linux systems, one way you can go is to use openssl, usually it is available on most servers,

Encyrpt:

openssl aes-256-cbc -iter 1000 -salt -e -in file.zip -out file.enc
pass:{password}

Decrypt:


openssl aes-256-cbc -iter 1000 -salt -d -in file.enc -out file.zip
pass:{password}

You should also be able to use it with des3, but I haven’t tested the fallowing:

Encrypt:

openssl des3 -salt -in file-plain.txt -out file-encrypted.txt.des3

Decrypt:

openssl des3 -d -salt -in file-encrypted.txt.des3 -out file-plain.txt