MOSQUITTO_CTRL(1) Commands MOSQUITTO_CTRL(1) (NAME) mosquitto_ctrl - Mosquitto (SYNOPSIS) mosquitto_ctrl [options | -o config-file] module-name module-command [command-options] options: [auth-options] [connection-options] [mqtt-options] [output-options] [tls-certificate-options | tls-psk-options] auth-options: [-u username] [-P password] connection-options: {[-h hostname] [--unix socket path] [-p port-number] | -L URL} [-A bind-address] [--proxy socks-url] mqtt-options: [-c] [-i client-id] [-q message-QoS] [-V protocol-version] output-options: [-d] [--quiet] tls-certificate-options: [--no-tls] {--cafile file | --capath dir} [--tls-use-os-certs] [--cert file] [--key file] [--ciphers ciphers] [--insecure] [--tls-alpn protocol] [--tls-keylog file] [--tls-version version] [--tls-engine engine] [--keyform {pem | engine}] [--tls-engine-kpass-sha1 kpass-sha1] tls-psk-options: --psk hex-key --psk-identity identity [--ciphers ciphers] [--tls-version version] mosquitto_ctrl [connection-options] ( ) mosquitto_ctrl [--help] (DESCRIPTION) mosquitto_ctrl Mosquitto . ( ) mosquitto_ctrl_shell(1). . (ENCRYPTED CONNECTIONS) mosquitto_ctrl TLS . mosquitto_ctrl . TLS x509 --cafile --capath . TLS TLS-PSK --psk --psk-identity . (MODULES) (Dynamic security) . dynsec . : mosquitto_ctrl_dynsec(1) (External modules) mosquitto_ctrl . example mosquitto_ctrl_example.so mosquitto_ctrl_example.dll . mosquitto_ctrl Mosquitto Mosquitto. (CONNECTION OPTIONS) $XDG_CONFIG_HOME/mosquitto_ctrl $HOME/.config/mosquitto_ctrl . -o config-file . -option value . . . -S. # . -A IP (bind) . . --cafile CA PEM . SSL . : --capath --capath CA PEM . SSL . --capath ".crt" "openssl rehash " . : --cafile --cert PEM . : --key . --ciphers TLS OpenSSL . ciphers(1) . -d, --debug . -D, --property MQTT v5 . MQTT v5 . : -D command identifier value -D command identifier name value command / MQTT CONNECT PUBLISH PUBACK PUBREC PUBCOMP SUBSCRIBE UNSUBSCRIBE DISCONNECT AUTH WILL . . identifier . '-' . : payload-format-indicator. . value . name user-property . value . --help . -h, --host . localhost . -i, --id . MQTT . v3.1.1/v3.1 mosq-XXXXXXXXXXXXXXXXXX X - . v5.0 . --insecure . DNS () . . . --key PEM TLS . : --cert . --keyform TLS . "pem" "engine" . TPM . "pem" . : --tls-engine. -L, --url URL . URL : mqtt(s)://[username[:password]@]host[:port]/topic ws(s)://[username[:password]@]host[:port]/path : mqtt:// - 1883 mqtts:// - 8883 ws:// - 80 wss:// - 443. --nodelay Nagle . . . -o config-file . -option value . . . -S. # . -p, --port . MQTT MQTT TLS . -P, --pw . MQTT v3.1 v3.1.1 . --username . --proxy SOCKS5 . "None" "username" . socks-url socks5h://[username[:password]@]host[:port] . socks5h . %25 %3A %40 % : @ . . . IPv6 socks5h://[::1]:1080. URL . SOCKS curl(1) . --psk ( 0x ) TLS-PSK . --psk-identity TLS-PSK . --psk-identity TLS-PSK. . -q, --qos (QoS) 0 1 2 . 1 . --quiet . ( --port ). --tls-alpn ( MQTT WebSockets) . --tls-engine openssl. openssl engine . : --keyform. --tls-engine-kpass-sha1 SHA1 TLS. TLS TPM . SHA1 . : --tls-engine. --tls-use-os-certs CA . --cafile --capath TLS . -L mqtts://... . --tls-version TLS . tlsv1.3 tlsv1.2 . tlsv1.2 . . -u, --username . --pw . --unix TCP. -h -L : mosquitto_ctrl --unix /tmp/mosquitto.sock ... socket_domain mosquitto.conf(5) Mosquitto . -V, --protocol-version MQTT . 5 311 31 mqttv5 mqttv311 mqttv31 . 311 . (PROPERTIES) -D / --property mosquitto_ctrl . : (Connect) o authentication-data ( - : ) o authentication-method ( UTF-8) o maximum-packet-size ( ) o receive-maximum ( ) o request-problem-information ( ) o request-response-information ( ) o session-expiry-interval ( : -x ) o topic-alias-maximum ( ) o user-property ( UTF-8) (Publish) o content-type ( UTF-8) o correlation-data ( - : ) o message-expiry-interval ( ) o payload-format-indicator ( ) o response-topic ( UTF-8) o topic-alias ( ) o user-property ( UTF-8) (Disconnect) o session-expiry-interval ( ) o user-property ( UTF-8) (Will properties) o content-type ( UTF-8) o correlation-data ( - : ) o message-expiry-interval ( ) o payload-format-indicator ( ) o response-topic ( UTF-8) o user-property ( UTF-8) o will-delay-interval ( ) (EXIT STATUS) . MQTT CONNACK . libmosquitto . CONNACK MQTT v3.1.1: o 0 (Success) o 1 : (Connection refused: Bad protocol version) o 2 : (Connection refused: Identifier rejected) o 3 : (Connection refused: Server unavailable) o 4 : (Connection refused: Bad username/password) o 5 : (Connection refused: Not authorized) CONNACK MQTT v5: o 0 (Success) o 128 (Unspecified error) o 129 (Malformed packet) o 130 (Protocol error) o 131 (Implementation specific error) o 132 (Unsupported protocol version) o 133 (Client ID not valid) o 134 (Bad username or password) o 135 (Not authorized) o 136 (Server unavailable) o 137 (Server busy) o 138 (Banned) o 139 (Server shutting down) o 140 (Bad authentication method) o 141 (Keep alive timeout) o 142 (Session taken over) o 143 (Topic filter invalid) o 144 (Topic name invalid) o 147 (Receive maximum exceeded) o 148 (Topic alias invalid) o 149 (Packet too large) o 148 (Message rate too high) o 151 (Quota exceeded) o 152 (Administrative action) o 153 (Payload format invalid) o 154 (Retain not supported) o 155 (QoS not supported) o 156 (Use another server) o 157 (Server moved) o 158 (Shared subscriptions not supported) o 159 (Connection rate exceeded) o 160 (Maximum connect time) o 161 (Subscription IDs not supported) o 162 (Wildcard subscriptions not supported) : o 27 (Timed out waiting for message) (ENVIRONMENT VARIABLES) MOSQUITTO_UNSAFE_ALLOW_SYMLINKS (symlink) . . . (BUGS) mosquitto : https://github.com/eclipse- mosquitto/mosquitto/issues (SEE ALSO) mosquitto(7), mqtt(7), mosquitto_ctrl_shell(1), mosquitto_rr(1), mosquitto_pub(1), mosquitto_sub(1), mosquitto(8), libmosquitto(3), mosquitto-tls(7) (AUTHOR) Roger Light Mosquitto Project 04/03/2026 MOSQUITTO_CTRL(1)