Loop through hostnames and ssh each one

Hi,

I would like to extract all hostnames from webhook trigger and ssh to each one and execute a command.
I am able to extract the hostnames and divide them into separate items but i do not understand how to ssh to each one.

Hey @Nativ_Adler,

Could you provide what you are sending to the webhook and I can quickly pop an example together for you.

I need to loop through all hostname under ‘instance’

You’ll need to use a split in batches node and in the SSH node set the credentials to use an expression with the hostname/IP. See ✨ Add SSH overrides for user, host, and port by pemontto · Pull Request #2333 · n8n-io/n8n · GitHub

1 Like

That did the trick.
Thanks @pemontto !!

1 Like