We know we can encrypt a file with openssl using this command:
openssl aes-256-cbc -a -salt -in twitterpost.txt -out foo.enc -pass stdin
The password will be read from stdin. As such, to provide the password beforehand, all we need do is prepend
echo "someGoodPassword" |
to the above command. My question is: How can I do this more securely? The above method doesn't look secure enough.
I'd appreciate some comments about this so I can understand this issue better.