william89731 / node-red-contrib-ssh-v3

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

Stops flows after installation #14

Closed novski closed 3 days ago

novski commented 9 months ago

Bildschirmfoto 2024-01-02 um 14 32 09

kafelnikovs commented 9 months ago

same problem here.... And when i try to uninstall it just can't any solution @william89731 ?

oxivanisher commented 6 months ago

Can confirm. This node is currently broken (at least with Node-RED v3.1.5).

oxivanisher commented 2 months ago

I just tested this with the current 4.0.2 node red and the problems still exists. I "solved" it for me by using the "exec" node and calling ssh myself.

I am using this to trigger WOL in another network (WOL packages are not routable). For this, I configured SSH on the WOL host like this:

In USERs .ssh/authorized_keys:

no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="/usr/bin/wakeonlan $SSH_ORIGINAL_COMMAND" ssh-ed25519 AAAAC3NzaMSSUPERSECURESSHKEYlkajsldijalskdjfglaisjdlay another_user@nodered_host

This will allow this SSH key to only run the /usr/bin/wakeonlan command with the $SSH_ORIGINAL_COMMAND command sent as option.

Then the exec node I set: Command: ssh -v USER@the_wol_host.example.com -i /home/another_user/.ssh/id_ed25519_nodered Append: ☑️ msg.payload

Now i only need to send a MAC address to this exec node and it will ssh to the target host and call it. Maybe this helps somebody get SSH from nodered to work.

novski commented 2 months ago

And how it does! Thx!

fc-projects commented 4 days ago

Hi guys,

I had the same problem. This is due to async-mutex dependency added in the code but not documented in the package. While waiting for a fix you can install it manually by going to your "~/.node-red/node_modules/" folder and run "npm install aync-mutex". Then restart nodered service or reboot your system.

william89731 commented 3 days ago

bump to 2.0.5