I am writing a bash file to automate a process. For this I created a new password-encrypted key using:
openssl ecparam -genkey -name secp256k1 | openssl ec -out key-file.pem -aes128 -passout: pass:foobar
It works perfectly with the password being foobar
.
Eventually I am using the following command in my scirpt:
seth account create --nonce=0 --wait keyAliasName
and on CMD it says:
Enter passphrase to unlock keyAliasName.
I tried:
echo foobar | seth account create --nonce=0 --wait keyAliasName
but that says:
ERROR: ERROR Reading the passphrase.
How to solve this error? Thanks!