# This is a question about a node called node red contrib sftp ssh

**URL:** <https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207>\
**Category:** General\
**Created:** [5 February 2024 05:45 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207 "2024-02-05T05:45:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Node7189](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Node7189](https://discourse.nodered.org/u/Node7189)\
**Post date:** [5 February 2024 05:45 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/1 "2024-02-05T05:45:28Z")

</div>

I apologize if this is a known issue, but I would like to ask. In this node, remote path and local path can be input using the msg method. However, Host, Username, and Password cannot be passed to the msg method properly. Is this a specification of the node? I don't really understand even after reading the documentation, so if anyone knows more, please let me know.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 February 2024 06:49 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/2 "2024-02-05T06:49:29Z")

</div>

Can you show us the message you are passing to the node with host, username and password overrides?

The node documentation suggests you can override `host` with `msg.sftp_ssh2_config.host`,  
`username` with `msg.sftp_ssh2_config.username` etc.

---

<div class="post-metadata">

**Author:** ![Node7189](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Node7189](https://discourse.nodered.org/u/Node7189)\
**Post date:** [5 February 2024 08:23 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/3 "2024-02-05T08:23:42Z")

</div>

Thank you for your reply. If you set the IP address in msg.host and write host in the post field of the sftp node, the following message will be displayed.  
error connect address lookup failed for host. Since it says that the host cannot be found, it seems that overwriting is not possible.  
I'm wondering why there is no function in the node.  
I tried the following.

msg.host  
msg.Host

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 February 2024 08:40 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/4 "2024-02-05T08:40:04Z")

</div>

> [@Node7189](#):
>
> I tried the following.
> 
> msg.host  
> msg.Host

But that's not what was suggested...

> [@jbudd](#):
>
> The node documentation suggests you can override `host` with `msg.sftp_ssh2_config.host`,  
> `username` with `msg.sftp_ssh2_config.username` etc.

Use a change node to set these then pass the msg into the node. Use a debug node to confirm

---

<div class="post-metadata">

**Author:** ![Node7189](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@Node7189](https://discourse.nodered.org/u/Node7189)\
**Post date:** [5 February 2024 13:22 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/5 "2024-02-05T13:22:44Z")

</div>

Thank you for answering. Please let me know if my understanding is correct. Set the following using change node etc. msg.sftp\_ssh2\_config.host, msg.sftp\_ssh2\_config.username, msg.sftp\_ssh2\_config.password. Does that mean that variable will be read by the sftp node? Also, you can skip the next question, but if you know it, please let me know. Do I need to write something in the blank space in the sftp node?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 February 2024 13:25 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/6 "2024-02-05T13:25:57Z")

</div>

> [@Node7189](#):
>
> Set the following using change node etc. msg.sftp\_ssh2\_config.host, msg.sftp\_ssh2\_config.username, msg.sftp\_ssh2\_config.password. Does that mean that variable will be read by the sftp node?

I dont know, i dont use that node. I am simply pointing you in the direction offered by @jbudd

> [@jbudd](#):
>
> The node documentation suggests you can override `host` with `msg.sftp_ssh2_config.host`,  
> `username` with `msg.sftp_ssh2_config.username` etc

In short, look at the built-in help

  

> [@Node7189](#):
>
> Do I need to write something in the blank space in the sftp node

probably not - does it not explain that in the built-in help?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [5 February 2024 14:27 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/7 "2024-02-05T14:27:55Z")

</div>

> [@Node7189](#):
>
> If you set the IP address in msg.host and write host in the post field of the sftp node

I understand why you tried that, you want to tell the node to use msg.host.  
_Some_ nodes will let you refer to a message property like that but they use mustache syntax eg _{{msg.host}}_  
There is no indication that this node interprets mustache syntax like that.

> [@Node7189](#):
>
> Do I need to write something in the blank space in the sftp node?

As @Steve-Mcl says, probably not. But it's easy enough for you to try it.  
Please report your findings so we all know the answer.

> [@Node7189](#):
>
> I'm wondering why there is no function in the node.

You seem to be stuck on the idea that the node does not permit this.  
It's a mental block. Step back a bit and read the built-in help:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6e454eceeb79dde06fe829adf184bbee0c75e4a3.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 May 2024 14:28 UTC](https://discourse.nodered.org/t/this-is-a-question-about-a-node-called-node-red-contrib-sftp-ssh/85207/8 "2024-05-05T14:28:18Z")

</div>

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