I am trying to access multiple servers and run some commands using the SSH nodes.
Created a table that contains a list of servers’ IPs and their respective action and used expression in connecting host field.
But ssh node is able to access first records only.
Printing private IP only.
Output:
[
I just tried this one, but the problem persist.
SSH into the first hostname all the times.
I have a list of 34 and I have 34 results from the command only executed on the first hostname.
@gabrielpc1190 can you share please the workflow of the google sheet and split in batch + SSH nodes on how to use multiple SSH machines to push a script? Thanks!
The key is combining split in batches with expressions in your SSH credentials. Take this workflow, the MyServers node could just as well be a spreadsheet node, it returns a host, port, and user.
If you’re using docker you can generate some test servers (myserver1 - myserver5) with this snippet:
for i in {1..5}; do
docker run -d --name=myserver$i \
-e PASSWORD_ACCESS=true \
-e USER_PASSWORD=password \
-e USER_NAME=test \
-p 222$i:2222 \
lscr.io/linuxserver/openssh-server:latest
done