Linux and UNIX hosts

Open a session in your Linux/Unix agent host as root user. Then, follow these steps:

  1. Add the agent to the manager.

# curl -u foo:bar -k -X POST -d '{"name":"ubuntu-ag","ip":""}' -H 'Content-Type:application/json' ""
  "error": 0,
  "data": {
      "id": "001",
  1. Import the key to the agent:

# /var/ossec/bin/manage_agents -i MDAxIE5ld0FnZW50IDEwLjAuMC44IDM0MGQ1NjNkODQyNjcxMWIyYzUzZTE1MGIzYjEyYWVlMTU1ODgxMzVhNDE3MWQ1Y2IzZDY4M2Y0YjA0ZWVjYzM=


If you paste the command directly into the terminal, the agent key will be saved in the bash history. Use manage_agents without arguments or from a script.

  1. Edit the Wazuh agent configuration in /var/ossec/etc/ossec.conf to add the Wazuh server IP address. In the <client><server> section, change the MANAGER_IP value to the Wazuh server address:

  1. Start the agent.

  1. For Systemd:

# systemctl start wazuh-agent
  1. For SysV Init:

# service wazuh-agent start
  1. Other cases:

# /var/ossec/bin/ossec-control start