# Issue with running telnet command in EXEC node-red

**URL:** <https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435>\
**Category:** General\
**Created:** [10 May 2022 05:06 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435 "2022-05-10T05:06:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdhaduk](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@pdhaduk](https://discourse.nodered.org/u/pdhaduk)\
**Post date:** [10 May 2022 05:06 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/1 "2022-05-10T05:06:31Z")

</div>

Hi everyone,

I am trying to execute a windows CLI command in the EXEC node in node-red.  
My command is "telnet 'IP address' 'port' ". It is working perfectly in the terminal, but the command shows failed when it runs in node-red.

Any suggestions, on how can I resolve this issue?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2022 06:07 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/2 "2022-05-10T06:07:43Z")

</div>

It will likely be the way you have formatted the exec command but you haven't shown us what you did.

Question. What do you want to achieve by launching telnet? Are you hoping to communicate with a device and get the result back into node red?

---

<div class="post-metadata">

**Author:** ![pdhaduk](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@pdhaduk](https://discourse.nodered.org/u/pdhaduk)\
**Post date:** [10 May 2022 06:14 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/3 "2022-05-10T06:14:11Z")

</div>

Hi,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/e/8e053a2a0740dfb2680d407594c3a684df6273af.png)  
The image is attached showing the output.  
I am trying to connect to the host and send SQL requests. Also, the output of the SQL request is in the XML version which I can convert easily in node-red

---

<div class="post-metadata">

**Author:** ![pdhaduk](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@pdhaduk](https://discourse.nodered.org/u/pdhaduk)\
**Post date:** [10 May 2022 06:15 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/4 "2022-05-10T06:15:16Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a563827020e7b10f6686dfccf4b43ce877192b7d.png)  
Hi,

The image displayed is the configuration of EXEC node

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2022 06:25 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/5 "2022-05-10T06:25:17Z")

</div>

> [@pdhaduk](#):
>
> I am trying to connect to the host and send SQL requests

What flavor of SQL? SQL server? Mysql?

---

<div class="post-metadata">

**Author:** ![pdhaduk](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@pdhaduk](https://discourse.nodered.org/u/pdhaduk)\
**Post date:** [10 May 2022 06:26 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/6 "2022-05-10T06:26:27Z")

</div>

Yes MYSQL

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2022 06:32 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/7 "2022-05-10T06:32:13Z")

</div>

Ok so I don't understand where telnet comes into this?

Can't you simply use the node-red-node-mysql and completely avoid this attempt to automate telnet?

---

<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:** [9 July 2022 06:33 UTC](https://discourse.nodered.org/t/issue-with-running-telnet-command-in-exec-node-red/62435/8 "2022-07-09T06:33:10Z")

</div>

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