cancel
Showing results for 
Search instead for 
Did you mean: 
Gregory_Robinso
F5 Employee
F5 Employee

Problem this snippet solves:

Having a backup copy of a chassis master key can be valuable during a recovery event. For organizations with large deployments, automating the process certainly helps.


How to use this snippet:

To back up the magic key via API, use the bash util command URI with the proper payload:

 

Sample URI:

 

https://192.168.1.100/mgmt/tm/util/bash

 

Payload:

{"command":"run","utilCmdArgs":"-c 'f5mku -K'"}

 

Response:

 

{"kind":"tm:util:bash:runstate","command":"run","utilCmdArgs":"-c 'f5mku -K'","commandResult":"ZFLI5n83NuetlE9A+bYqwg==\n"}


The master key is the commandResult field, minus the trailing \n.

Code :

curl -sku admin:admin -H "content-type: application/json" -X POST https://192.168.1.100/mgmt/tm/util/bash -d {"command":"run","utilCmdArgs":"-c 'f5mku -K'"}

Tested this on version:

13.0
Version history
Last update:
‎13-Aug-2019 06:16
Updated by:
Contributors