Description
Current command
openssl rand -hex 64 -out /opt/.secrets/pwd.key
throws error - Extra arguments given.
rand: Use -help for summary.
Use below command instead
openssl rand -out /opt/.secrets/pwd.key -hex 64
Current command
openssl enc -aes-256-cbc -salt -in /opt/.secrets/common_os_pwdfile -out /opt/.secrets/common_os_pwdfile.enc -pass file:/opt/.secrets/pwd.key
throws warning
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
Syntax -
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in InputFilePath -out OutputFilePath
Use below command instead-
openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in /opt/.secrets/common_os_pwdfile -out /opt/.secrets/common_os_pwdfile.enc -pass file:/opt/.secrets/pwd.key