connect to multiple servers using SSH and execute commands

Requirement:

Run a shell script with below inputs
file name
checksum
path

the script should go to multiple servers (around 35) and verify the input cksum and if there is a mismatch display a simple message to the user that cksum verification failed.

host details, user id / password are all constant and can be hardcoded in some file or directly in the script.

In short a shell script is requried which can login to another machine and execute the cksum for the file in the given path and return the output

pls assist, i did google a bit and didnt find a proper solution

thanks in advance!!!

UNIX tools are so flexible that hunting for a way to login and do checksums is like hunting for a programming language designed to print the letter 'A'. Not likely someone's going to have had the exact same problem as you, but you can use things you know and put them together... like ssh, and loops:

#!/bin/sh

while read SERVER
do
        # Using "/bin/sh -s" lets us carefully control what inputs we give the remote program.
        # Arguments after the -s will show up as $1, $2, $3...  The program itself is read
        # from standard input.  We pipe it in with a here-document.
        ssh username@"$SERVER" /bin/sh -s "filename" "checksum" "path" <<"EOF"
                echo "Filename is $1"
                echo "Checksum is $2"
                echo "Path is $3"
# This EOF ought to be at the beginning of the line and NOT indented.
EOF
done < serverlist

If you know how to verify the checksum on a local server, you know how to do so on a remote server: Just write the code between the <<"EOF" and EOF. No local variables will make it in except ones you put on the commandline, like where "filename" "checksum" "path" is.

If you don't, I'll need more information on what exactly you're trying to do -- what form of checksum for example.