According to the help docs of manage_clients:
-f Bulk generate client keys from file. (Manager only). contains lines in IP,NAME format.
So I tried this:
root@ossec-server:/var/ossec/etc# /var/ossec/bin/manage_agents -f /tmp/agent
Bulk load file: /tmp/agent
Opening: [/tmp/agent]
Failed.: No such file or directory
2015/05/16 15:07:34 manage_agents(1103): ERROR: Unable to open file '/tmp/agent'.
Even with full access:
root@ossec-server:/var/ossec/etc# ls -l /tmp/agent
-rw-r--r-- 1 777 root 16 May 16 14:57 /tmp/agent
Content seems good:
root@ossec-server:/var/ossec/etc# cat /tmp/agent
127.0.0.1,agent