Friday, September 23, 2022

Getting Wazuh Agent key from Wazuh Server

 TOKEN=$(curl -u "<username>:<password>" -k -X GET "https://<hostname or ip address>:<port number>/security/user/authenticate?raw=true")



curl -k -X POST -d '{"name":"<agentname>"}' "https://<hostname or ip address>:<port number>/agents?pretty=true" -H "Content-Type:application/json" -H "Authorization: Bearer $TOKEN"

No comments:

Post a Comment

jq command in Linux

 How to access the {"field-name":"cskmetro"} echo "{\"field-name\":\"cskmetro\"}" |jq -r ...