The /var/ossec/bin/manage_agents tool can manage Wazuh agents using the command line interface (CLI).
Run the following command on the Wazuh server ( /var/ossec/bin/ ):
./manage_agents
****************************************
* Wazuh v4.8.0 Agent manager. *
* The following options are available: *
****************************************
(A)dd an a,gent (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: r
Available agents:
ID: 002, Name: Ubuntu, IP: any
Provide the ID of the agent to be removed (or '\q' to quit): 002
Confirm deleting it?(y/n): y
Agent '002' removed.
manage_agents: Exiting.