I need to create a script which will connect 4 different servers one by one, and check if the server is running then execute a command and exit. If first server is not running then connect to second and exit.
I am thinking about connecting through SSH script using key based authentication.
Please help.
What about