Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.