Linux/Mosquitto: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 14: Line 14:
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"
mosquitto_pub -t "test" -m "test message" -h servername -u "username" -P "password" -p 8883 --capath /etc/ssl/certs/
mosquitto_pub -t "test" -m "test message" -h servername -u "username" -P "password" -p 8883 --capath /etc/ssl/certs/
</pre>
</blockquote>
* add user
<blockquote>
<pre>
mosquitto_passwd /etc/mosquitto/users BENUTZERNAME
</pre>
</pre>
</blockquote>
</blockquote>

Revision as of 13:22, 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