Friday 23 August 2019

How to run a telnet command through node ?

I am trying to use telnet-client library to shutdown a projector in node. Here is my command so far.const Telnet = require("telnet-client"); let tel = new Telnet(); let params = { host: '192.168.20.201', port: 4352, shellPrompt: '', timeout: 2500 } try { await tel.connect(params) await tel.exec('%1POWR 1 '); } catch (error) { console.log("telnet error") console.log(error) } What exactly am I doing wrong here?

Submitted August 23, 2019 at 07:56PM by samratluitel

No comments:

Post a Comment