Linux/Mosquitto: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 25: Line 25:
</blockquote>
</blockquote>


 
== Links ==
https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices
* https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices
http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html
* http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html


[[Category:Linux/Services]]
[[Category:Linux/Services]]
[[Category:Linux]]
[[Category:Linux]]

Revision as of 18:18, 2 September 2018

  • usage
    • subscribe
mosquitto_sub -t "test" -h servername
mosquitto_sub -t "test" -h servername -u "username" -P "password"
mosquitto_sub -t "test" -h servername -u "username" -P "password" -p 8883 --capath /etc/ssl/certs/
  • publish
mosquitto_pub -t "test" -m "test message" -h servername
mosquitto_pub -t "test" -m "test message" -h servername -u "username" -P "password"
mosquitto_pub -t "test" -m "test message" -h servername -u "username" -P "password" -p 8883 --capath /etc/ssl/certs/


  • add user
mosquitto_passwd /etc/mosquitto/users BENUTZERNAME

Links