here the command which you have to use:
wget -q -O <filenameincluding the systemname>.xml --no-check-certificate --user=<username> --password=<password> "https://<servername>:8443/remote/eeadmin.exportMachineKey?machineName=<system name as variable>"
You have to put the right values between every <>.
Put the command into a loop. By using a variable which takes the system names one by one you can export the keys.
Instead of using eeadmin.exportMachineKey?machineName=<system name as variable> you also can use eeadmin.exportMachineKey?machineName=<system name as variable>&oldKeys=True"
to export all keys corresponding to one system.
The information is taken from document "ee_620_scripting_guide_en-us.pdf" and "ePO_Web_API_Scripting_Guide_en-us.pdf"