Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am encrypting a tar file (created using tar cfz) on an Ubuntu 10.04 box using the following command:

openssl enc -aes-256-cbc -salt -in myfile.tar -out myfile.enc.tar -pass pass:${P}

Now I copy the encrypted file to another machine and decrypt it using following command:

openssl enc -d -aes-256-cbc -in myfile.enc.tar -out myfile.tar -pass pass:${P}

But I'm not able to open the decrypted arhchive file myfile.tar. Am I doing something wrong here or this is not possible?

EDIT: Working now I think I missed a parameter during decryption (-salt)

openssl enc -d -aes-256-cbc -salt 

share|improve this question
Mark your answer as accepted when you get a chance, thanks. – Andrew B Feb 2 '13 at 6:13
Sure I will but have to wait some time. – TheVillageIdiot Feb 2 '13 at 11:03
up vote 2 down vote accepted

Well the culprit seems to be a missing parameter -salt that I used while encrypting. The following made it work:

openssl enc -d -aes-256-cbc -salt -in myfile.enc.tar -out myfile.tar -pass pass:${P}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.