I am trying to update some files on 3 nodes, where I want to **combine every connection with a specific user path**. As I am very new to this, I extended a `for loop` I used to connect as root, into a `nested for loop` **with 2 different arrays**.

The following script **tries of course to use all 3 user paths on every connection**.
I also tried to use an `array` only with `ips`, then every user is trying to connect to all 3 nodes.

```
#!/bin/bash
EXTENSIONS='/home/bi/.local/share/gnome-shell/extensions'
NODE_SRVS=(
'mf@192.168.122.60'
'lf@192.168.122.92'
'qf@192.168.122.93'
)
NODE_USERS=(
'mf'
'lf'
'qf'
)

echo -e "sync my extensions to my nodes \c"; read
for i in ${NODE_SRVS[@]}; do
  for u in ${NODE_USERS[@]}; do
    rsync -rt --delete --info=progress2,stats2 \
    -e ssh -tt \
    $EXTENSIONS/ \
    $i:/home/$u/.local/share/gnome-shell/extensions/
  done
done

```

Is there a way to restrict the array permutations so *that the 1st array connection corresponds only to the first array username*, etc?

Else, what is the correct **looping construction to match every connection only to the corresponding user path?**