# How to send the message to a server via mqtts via terminal

**URL:** <https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756>\
**Category:** General\
**Created:** [10 February 2021 15:42 UTC](https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756 "2021-02-10T15:42:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saeed1](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@saeed1](https://discourse.nodered.org/u/saeed1)\
**Post date:** [10 February 2021 15:42 UTC](https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756/1 "2021-02-10T15:42:14Z")

</div>

Hello Guys,

I have a remote server, on that mqtt broker is running. Mqtt has been secured by ssl certificate and now port 8883 is open to receive the mqtts messages.

Now i have a raspberry pi and i want to use the terminal of raspverry pi to send the mqtts message to my remore server but i got no success. This is the command

**mosquitto\_pub -h mqtts://136.33.45.56 -p 8883 -t test -m "okay" -u aswin -P 123efr -d**

where im doing the mistake? if i use simple mqtt then the following command is working fine

**mosquitto\_pub -h 136.33.45.56 -p 1883 -t test -m "okay" -u aswin -P 123efr -d**

Thank you.

---

<div class="post-metadata">

**Author:** ![ryan780](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ryan780/32/22974_2.png) [@ryan780](https://discourse.nodered.org/u/ryan780)\
**Post date:** [10 February 2021 16:12 UTC](https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756/2 "2021-02-10T16:12:26Z")

</div>

You don't mention Node Red....are you setting up the NR MQTT In node to receive the messages?

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [10 February 2021 16:13 UTC](https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756/3 "2021-02-10T16:13:28Z")

</div>

Have a look [here](http://www.steves-internet-guide.com/mosquitto_pub-sub-clients/) under the chapter **Mosquitto\_pub -Publish Using SSL**

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 April 2021 16:14 UTC](https://discourse.nodered.org/t/how-to-send-the-message-to-a-server-via-mqtts-via-terminal/40756/4 "2021-04-11T16:14:25Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
