I am new to shell script. In my project there is a requirement to keep all the sensitive data in encrypted format. For to achieve this I need to openssl in command line tool. I tried the following command openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc It is not asking me to enter password. And it is not showing anything. Please help me to solve this problem. Clik here to see the screen shot
Asked
Active
Viewed 5,813 times
2
-
This question might be better phrased as "How to encrypt a file with AES using OpenSLL" – Tom Jun 25 '17 at 22:00
-
Possible duplicate of [How to use OpenSSL to encrypt/decrypt files?](https://stackoverflow.com/questions/16056135/how-to-use-openssl-to-encrypt-decrypt-files) – Tom Jun 25 '17 at 22:03
2 Answers
2
I had the same issue with openssl
not providing any output. Executed the same using winpty
and it worked as expected:
$ winpty openssl enc -salt -aes-256-cbc -in file -out file.enc
enter aes-256-cbc encryption password:
Verifying - enter aes-256-cbc encryption password:
$ git --version
git version 2.14.1.windows.1

Xanothos
- 448
- 3
- 6
0
If the question is indeed, "How do I encrypt a file with AES" then I think this line might work, found from either here, or here.
openssl enc -aes-256-cbc -salt -in secrets.txt -out secrets.txt.enc

Tom
- 2,830
- 1
- 18
- 22
-
Thank you so much Tom for the answer. I am working in windows environment. I executed above command in git bash, didn't get any output. – Sathish Ganesh Jun 27 '17 at 04:35