ksh script to test max number of parallel ssh connections

hello ,

I need to check how many parallel ssh connections my server can take the load of.
I need to login to different host which i am planning to read from a file and then a write a loop which will do parallel ssh.

Please provide suggestion on how i can write script for the same.\

Thank you.

based on the ssh-key based authentication is setup between hosts,

cat $HOSTSFILE|while read  remhost
do
echo "Going for $remhost"
ssh $remhost ls &
done

Please note that this is sequential login to all systems , I have put the ssh command in background so that you get all sessions running in background immediately which in trun depends upon the command that you will run from within the SSH
regds,