I have requirement to login into a multiple linux boxes by running the shell script in a single linux box and to find the count of files in a specific folder in each box and log them in a log file in the box where i m runnning the script. Box names will be stored in a text file host.txt.
Please do let me know if anyone has an idea on that.
set passwordless ssh ( google it )
while read systemName
do
ssh user@systemName "ls -l /your/path | wc -l > count.txt"
done < host.txt
wc -l gives +1 in your result as it count the line number which is "total"
My main concern is i have to login into 300 linux server and all are having same userid and password. I dont want to create any key for each server to login . Is there a way to run the script ?