我使用 mosquitto_passwd
命令来创建密码文件。
mosquitto_passwd /etc/mosquitto/passwd admin
我在
mosquitto.conf
文件中添加了密码文件的路径:password_file /etc/mosquitto/passwd
但是当我订阅或发布时,它不需要用户名/密码?
mosquitto_sub -t '#' -d
Client mosqsub/19032-Dell sending CONNECT
Client mosqsub/19032-Dell received CONNACK
Client mosqsub/19032-Dell sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
Client mosqsub/19032-Dell received SUBACK
Subscribed (mid: 1): 0
我错过了什么?