insectos / node-red-ssh-exec

NodeRED Node for SSH
Apache License 2.0
2 stars 2 forks source link

Providing host in msg only works without password (of the private key) #5

Closed Stwissel closed 1 year ago

Stwissel commented 1 year ago

Describe the bug Altering host has no provision to provide a password

To Reproduce Steps to reproduce the behavior:

  1. configure node
  2. use msg.sshhost to provide host name that neeeds cert passsword
  3. try to connect

Expected behavior ability to provide password

juggledad commented 1 year ago

Why should you need to provide a password it it is set the the .config file?

Stwissel commented 1 year ago

To the best of my knowledge, and the official documentation, as well as the ssh academy you can't specify the password for your private key in ~/.ssh/config.

juggledad commented 1 year ago

Your right, that I meant is why do you need to provide a password since you have to created an entry in ~/.ssh/config that points at the key? If I want to ssh into a site where I've set up the public/private keys you just use ssh sitename, you don't provide a password so why is it needed in the node?

isn't that the reason for setting up private/public keys?

By the way it you use the regular exec node you can send this a s a command and it works fine: ssh testpi & ls -al & exit

Stwissel commented 1 year ago

In case you secured the private key with a passphrase, you need a way to provide it. When your key doesn't have a passphrase, you don't need this. Unless you set it in the node config, for the defsult host, then you provide an empty string Fixed in 0.3.2