Ping script

I want find from a file , where list of hosts is given .

Whether SSH is running on that Hosts and
and create 2 files :

HOSt-SSH-Running
HOST-SSH-Not-running

In the list we have some Windows and Unix Servers, windows servers do not have sshd running.

#!/bin/sh
for host in $list_of_hosts
do
  if version=`(sleep 1 ; echo "") | telnet $host ssh | grep -i SSH`
  then
    echo "$host $version" >> HOSt-SSH-Running
  else
    echo "$host" >> HOST-SSH-Not-running
  fi
done

It helped perfectly,