problem:
Just build emq service is enabled by default anonymous user access, so the environment is very unsafe, just know ip address can be connected, it is strongly recommended to enable user authentication, password!
Resolution process
1. Modify the configuration file
vim /etc/emqx/emqx.conf
modified to true to false
allow_anonymous to false =
2. Restart Service
systemctl stop emqx
systemctl start emqx
3. Import plug-in module
cd /usr/lib/emqx/bin
sh emqx_ctl plugins load emqx_auth_username
4. Set the account password
emqx_ctl users add admin public
Reference Documents
The official document:
https://docs.emqx.io/broker/v3/cn/commands.html#status