Create a Date Check Script

I have about 100 Linux servers running in Amazon EC2 (CentOS 6 based) and I need to run a 'date' command against all of them. Rather than logging into each individual server via 'ssh' and running the 'date' command, can someone please help me with how something like this can be scripted? I obviously have NO scripting experience what so ever sadly. I'd love to learn and become a stronger / more efficient Linux administrator but not sure where to start. Can anyone please give me any info on where to start, what I should start writing this script in (i.e. perl, python, bash, etc etc etc), and or anything else?

Thank you for your help!

You still will need to log into every single server, but you can do it in a loop in a script. Set the servers up for passwordless login (--> man ssh), put their names into a file, and in a while loop read the server names line by line, issue the ssh user@hostname command , and collect the output into a log file.

To access every server, I simply do:

ssh -i sshkey.pem user@server1/2/3/4/5/6/100

No password needed...

if servers run time service (traditional port 13) you can do something like this:

 
{ print -u3 "\n"; cat <&3; } 3</dev/tcp/198.168.1.2/13
Tue Aug  6 13:03:40 2013

so put your IPs in one file and feed it into this one-liner

So I have a list of hostnames:

server1.domain.tld - server100.domain.tld

Can you explain what you mean by "put my IP's in one file"? I don't see in your example where you call a file expected to be loaded with IP's or FQDN's...

I put list of ip addresses into file called ip_list

 
cat ip_list
192.168.1.103
192.168.1.104
192.168.2.122

then run:

 
for ip in $( cat ip_list ); do 
        #echo $ip; 
        { print -u3 "\n"; cat <&3; } 3</dev/tcp/${ip}/13;
done

I have it working under ksh and I believe bash should work, too.

how about this ideal?

Confirm if SNMP port is opened by default on these 100 cloud servers or not, then install MRTG (MRTG - Tobi Oetiker's MRTG - The Multi Router Traffic Grapher) or others monitoring tools, display their CPU/load information, which will show the date/time as well, it didn't show the exact time, but will give you reference.

second, confirm NTP service are set correctly, then you needn't worry about the time difference any more.