Jacques44 / node-red-contrib-bigssh

remote command using ssh big node
Apache License 2.0
8 stars 12 forks source link

Injecting command including pipe "|" #21

Closed bkdfkup closed 3 years ago

bkdfkup commented 3 years ago

I have an issue where the BIGSSH node will not accurately inject a command payload (from an external node) when a pipe ("|") is used to process the output of the initial command. All simple/single commands work fine when injected.

Example: "whois xxx.xxx.xxx.xxx | grep netname"

IF I enter the command into the BIGSSH node directly it outputs correctly, however if inject a command to the node as an argument, it fails. I particularly need to inject this from outside BIGSSH due to the IP address not being static.

Grateful for assistance. Thanks in advance.

Jacques44 commented 3 years ago

Hello, I've made a special version of bigssh for you :-) It'll now be possible to send a json value as a payload and set the command to a template string I'm having dinner right now, will publish after !

Screen Shot 2020-11-25 at 18 50 01

Jacques44 commented 3 years ago

Published.

bkdfkup commented 3 years ago

You legend!! Thanks so much for spending the time on it (and the nodes in general). I'm about to head to work, but will try test tonight 👍

Jacques44 commented 3 years ago

Time for movie before night here, you'll tell me if it's ok Have a nice workday!

bkdfkup commented 3 years ago

Thanks! Dumb question, however there is no update in the Node-RED palettes for BIGSSH. Do i need to do a manual NPM install?

Jacques44 commented 3 years ago

my pleasure, I used to npm update to get the latest. I've published it, should work

bkdfkup commented 3 years ago

One last question, are you able to share the flow pictured above so i can learn how the bigline and bigstatus nodes function?

Jacques44 commented 3 years ago

Just done :-) bigline is used to convert the byte mode flow to human readable text bigstatus is here to display the control messages such as duration, return code, status...

I've made some rework on the main readme

bkdfkup commented 3 years ago

You are amazing. I shall mark this issue as closed 👍