Forum Discussion
Feb 26, 2019
I think you got the syntax wrong for the command:
This worked fine for me:
curl -sku admin:admin https://192.168.10.23/mgmt/tm/util/bash -H "content-type:application/json" -d "
{
\"command\": \"run\",
\"utilCmdArgs\": \"-c 'openssl genrsa -aes256 -passout pass:DitIsEenTest123 -out /config/ssl/ssl.key/f5test.com_2015.key 2048'\"
}
"
Result:
{"kind":"tm:util:bash:runstate","command":"run","utilCmdArgs":"-c 'openssl genrsa -aes256 -passout pass:DitIsEenTest123 -out /config/ssl/ssl.key/f5test.com_2015.key 2048'","commandResult":"Generating RSA private key, 2048 bit long modulus\n.......................+++++\n..................+++++\nunable to write 'random state'\ne is 65537 (0x10001)\n"}`
And file exists:
[root@f5yp01:Active:Disconnected] config ls /config/ssl/ssl.key/
default.key f5test.com_2015.key