william89731 / node-red-contrib-ssh-v3

node module for nodered
Apache License 2.0
9 stars 6 forks source link

Unable to exec #12

Closed waldbaer closed 9 months ago

waldbaer commented 9 months ago

Hi @william89731

Issue Description

Unfortunately I am not able to send a simple command to a SSH server.

When triggering the flow Node-RED is crashing with the following exception:

16 Oct 18:49:11 - [red] Uncaught Exception:
16 Oct 18:49:11 - [error] Error: Unable to exec
    at Array.<anonymous> (/home/x/.node-red/node_modules/ssh2/lib/client.js:1836:39)
    at onCHANNEL_CLOSE (/home/x/.node-red/node_modules/ssh2/lib/utils.js:76:21)
    at ChannelManager.cleanup (/home/x/.node-red/node_modules/ssh2/lib/utils.js:200:7)
    at Socket.<anonymous> (/home/x/.node-red/node_modules/ssh2/lib/client.js:831:21)
    at Socket.emit (node:events:514:28)
    at TCP.<anonymous> (node:net:337:12)

My flow (Abstract, details see bottom):

Inject node with msg.payload="?"
-> ssh-v3 node with a ssh-conf using host, username and password only
-> debug node

My environment:

16 Oct 18:48:50 - [info] Node-RED version: v3.1.0
16 Oct 18:48:50 - [info] Node.js  version: v20.8.0
16 Oct 18:48:50 - [info] Linux 6.5.7-arch1-1 x64 LE
node-red-contrib-ssh-v3   Version 2.0.3

Full Flow Details:

Full Flow Details [ { "id": "8d15f12f4eba6ad8", "type": "ssh-v3", "z": "41a8895c5f113b68", "name": "", "conf": "8f1af3d39004ee55", "debug": false, "x": 630, "y": 1420, "wires": [ [ "dc76167f81801ffc" ] ] }, { "id": "75e0b9a0802a1433", "type": "inject", "z": "41a8895c5f113b68", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "?", "payloadType": "str", "x": 510, "y": 1420, "wires": [ [ "8d15f12f4eba6ad8" ] ] }, { "id": "dc76167f81801ffc", "type": "debug", "z": "41a8895c5f113b68", "name": "debug ssh", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 770, "y": 1420, "wires": [] }, { "id": "8f1af3d39004ee55", "type": "ssh-conf", "ssh": "", "name": "target", "userlabel": "target" } ]
william89731 commented 9 months ago

You've already opened issue #11