21
我使用了mosquitto_passwd
命令來創建密碼文件。如何設置用戶名/密碼mosquitto?
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
我錯過了什麼?
不要忘記給予好評並接受答案如果爲你工作。謝謝! – kartben
我沒有足夠的15聲望upvote給你:D – datnq
現在你有:) –