wazuh-certificates.tar: Cannot open: No such file or directory

4,658 views
Skip to first unread message

N0S

unread,
Feb 17, 2023, 3:08:27 AM2/17/23
to Wazuh mailing list
Dear team,

When I am creating new server and adding certificate but here I am stuck please have a look me as quick as possible.


[root@localhost filebeat]# tar -xf ./wazuh-certificates.tar -C /etc/filebeat/certs/ ./$NODE_NAME.pem ./$NODE_NAME-key.pem ./root-ca.pem
tar: ./wazuh-certificates.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Looking forward to assist me on this,

Thank You!
Nasdeen

Roman Luna

unread,
Feb 17, 2023, 7:42:45 AM2/17/23
to Wazuh mailing list
Hi,

In the beginning of the command, the ./ is used, meaning that is trying to unzip a tar file in the directory you are currently in.

You can see in the guide that it is always using the same path, it is usually the home directory when becoming root:

  • Run ./wazuh-certs-tool.sh to create the certificates. For a multi-node cluster, these certificates need to be later deployed to all Wazuh instances in your cluster.
    tar -cvf ./wazuh-certificates.tar -C ./wazuh-certificates/ .
bash ./wazuh-certs-tool.sh -A

  • Compress all the necessary files.
rm -rf ./wazuh-certificates
  • Copy the wazuh-certificates.tar file to all the nodes, including the Wazuh indexer, Wazuh server, and Wazuh dashboard nodes. This can be done by using the scp utility.


Useful commands:
The pwd command writes to standard output the full path name of your current directory
ls -a will list all files including hidden files (files with names beginning with a dot) and with  -l gives a long listing of all files.

I also recommend downloading the OVA for faster testing of the app if that is your intention or using the assistant as it takes care of many steps for you,


Regards.
Reply all
Reply to author
Forward
0 new messages