# /var/ossec/bin/manage_agents
****************************************
* OSSEC HIDS v2.5-SNP-100809 Agent manager. *
* The following options are available: *
****************************************
(A)dd an agent (A).
(E)xtract key for an agent (E).
(L)ist already added agents (L).
(R)emove an agent (R).
(Q)uit.
Choose your action: A,E,L,R or Q:
Choose your action: A,E,L,R or Q: a
然后提示您为新代理提供一个名称。这可以是标识系统的主机名或另一个字符串。在本例中,代理名称将是agent1。
- Adding a new agent (use '\q' to return to the main menu).
Please provide the following:
* A name for the new agent: agent1
* The IP Address of the new agent: 192.168.2.0/24
* An ID for the new agent[001]:
Agent information:
ID:002
Name:agent1
IP Address:192.168.2.0/24
Confirm adding it?(y/n): y
Agent added.
Choose your action: A,E,L,R or Q: e
Available agents:
ID: 001, Name: agent1, IP: 192.168.2.0/24
Provide the ID of the agent to extract the key (or '\q' to quit): 001
Agent key information for '001' is:
MDAyIGFnZW50MSAxOTIuMTY4LjIuMC8yNCBlNmY3N2RiMTdmMTJjZGRmZjg5YzA4ZDk5m
** Press ENTER to return to the main menu.
Choose your action: A,E,L,R or Q: r
Available agents:
ID: 001, Name: agent1, IP: 192.168.2.0/24
Provide the ID of the agent to be removed (or '\q' to quit): 001
Confirm deleting it?(y/n): y
Agent '001' removed.
****************************************
* OSSEC HIDS v2.5-SNP-100809 Agent manager. *
* The following options are available: *
****************************************
(I)mport key from the server (I).
(Q)uit.
Choose your action: I or Q: i
* Provide the Key generated by the server.
* The best approach is to cut and paste it.
*** OBS: Do not include spaces or new lines.
Paste it here (or '\q' to quit): [key extracted via manage_agents on the server]
Agent information:
ID:001
Name:agent1
IP Address:192.168.2.0/24
Confirm adding it?(y/n): y
Added.
** Press ENTER to return to the main menu.
为了使更改生效,您必须重新启动服务器并启动代理。