You might want to use passwordless communication via ssh. There is plenty of instructions on this forum on it and on the web. Use the search function of this forum please.
Well, for monitoring, it might be simpler, architecturally, to put a cron calling a script on each host to send the data to you, perhaps by nfs, ssh2, scp2, email. With NFS, the script and data could all be mounted locally. A central script would ensure everyone is reporting regularly, and perhaps load the data into an RDBMS for reporting and trend monitoring.
If you do not want nfs or remote scripts, you can ship the scripting from a central script:
while read host
do
echo ". ./.profile
-- all commands you want to run --
" | ssh2 $host ksh >>log_dir/$host.$(date '+%Y''%m''%d-%H%M').log 2>&1
if [ $? != 0 ]
then
echo "$host Down!"
fi
done <host_list_file
I prefer echo '...'"..."'...' | over <<!, keeping stuff flowing left to right, with switch to "..." where I want local interpretation, like $var, `` or $(), not piles of \escapes. Everything inside '...' is pretty stable and low cost for the shell to produce, so start there, go to "..." as necessary, and your life will have fewer unpleasant surprises.