[Voyage-linux] Remote config check with ssh
Beat Meier
(spam-protected)
Tue Aug 1 19:54:19 HKT 2006
Hello
I've a problem with ssh. I try to figure out if all ap config files are
the same.
So i have a shell script which has an outer loop which loops over all files
and an inner loop which loops over the hosts.
In the inner loop I do a ssh to the current host with the current file.
The problem is that it iterate only over the first file and I have not
figured
out why. I have tried several ssh clients and several ssh servers (also
dropbear)
All the same, so the problem lies in the script/ssh connection. It seems
as the
ssh "modifes" the outer loop.
If you replace ssh with other command like echo, ls it works.
Any hints what I'm doing wrong? What does you do to check clients/ap if they
are on the same "level"?
Thanks
Beat
Here the stripped down script:
hostlist="91 101"
flist=$1
while read destfile srcfile; do
echo "Checking file $destfile from $srcfile"
echo "hostlist=$hostlist"
for i in $hostlist; do
hostname="woc${i}"
echo "Checking $hostname"
# echo ssh root at 192.168.99.${i} md5sum $destfile
ssh root at 192.168.99.${i} md5sum $destfile
done
done < $flist
More information about the Voyage-linux
mailing list