We have an old system in which from a set of computers, exactly one is configured as the "live" machine and the rest are fail-overs. We used to use ping to determine which was which, however, security updates now render ping useless.
I have found that ssh is still available and I can do essentially the same thing using ssh, however, I don't see that ssh has the same timeout option as does ping (we used a 1 second timeout which was more than adequate in our environment). I changed the script to use use ssh (running uname) and the process will work, except that I don't have the timeout option, when the script hits the machine that has been reconfigured, ssh hangs for a very long time.
Is there anyway to set a short time out for ssh to connect or find some other way to kill it after 1-2 seconds? Of course, if there is another way to see quickly if any machine responds to a hostname, or rather if no machine responds to a hostname, I'd love to know that, too.