Node-red in docker problems executing ssh into synology

Hello,
i have node-red running in docker under synology.
i want to execute a command on my synology(which is outside the docker container) but somehow i can not get it to work

i created private and public keys and as far as i can see everything is working under the synology shell

i used the complete path to the identity file in the sybology shell

under docker, node-red has it local data mapped to /data
in that directory i have a directory called ssh which holds the nodered private key

i somehow can not get the hello to echo in nodered
if i change the path in the nodered execute node it generates an error. if i change it back there is no error(thus it can find the identity file

i want to execute a command on my synology(which is outside the docker container)

The point of a container is to "contain" everything, ie sandbox. You cannot execute commands outside the container. You will need to install the required command inside the container and/or build a new container with the command included.

But in this case, it would be to install one of the ssh client nodes via manage palette.

ok. it should be possible but indeed i am trying to do something which is not supposed to work.

i tried the ssh client but no luck there either.
i tried the script to do a local output but that does not work so the script does not get executed.
command is in the payload as recommended

image
image

What does /tts/nodered mean in the ssh field ?
Anyway I think you cannot specify ports in the ssh client nodes come to think of it.

But on top of that you will need to specify these ports to the docker container too (and you could map 22 to 2222)
This is one of those edge cases where you run into problems when using node-red in a container.

thanks. dropped the ssh thing completely.

worked things out with a combination of arp and ping but now have another problem which i post in a new thread. something with Promise

You should consider to run node-red "natively", it will make your life easier when you need to get out of the container (ie. your other topic will introduce similar issues).

yes, you are right but docker is so damned easy to use that i am hesitating.
Currently i only have domoticz running natively on synology(using a package)

is there a node-red package available. i do not want to install it manually because this causes lot's of problems when upgrading/downgrading.

1 Like

i do not want to install it manually

What do you mean with this ?

You can install node-red via npm directly, but this will depend on the node/npm version that is available on your synology, if it's 10 or higher you can install it.

i mean install it through a synology package

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