Hi,
I have a list of server server1 server2. I am trying to find their uptime. So, I am using for loop, with condition
- It check weather server is responding to ping - if yes it ssh and check uptime
- it does not reply to ping - it capture servername in log file
Issue : I have server which reply to ping . However, ssh does not work [ because server is freezed ]
What i want to achieve :
After checking the ping status of this server, when i do ssh - it ends a infinite status of waiting for ssh prompt, which it does not get [ bcoz server is freezed ]
- What i can do to get this out of situation OR [ ssh timeout something...i do not want to change my default ssh file settings ]
- Check some other things after ping status.So, that i do not fall in this condition and this server goes as failed in log file.
Please help me out. I am running out of idea's.
I have a list of server server1 server2. I am trying to find their uptime. So, I am using for loop, with condition
- It check weather server is responding to ping - if yes it ssh and check uptime
- it does not reply to ping - it capture servername in log file
Issue : I have server which reply to ping . However, ssh does not work [ because server is freezed ]
What i want to achieve :
After checking the ping status of this server, when i do ssh - it ends a infinite status of waiting for ssh prompt, which it does not get [ bcoz server is freezed ]
- What i can do to get this out of situation OR [ ssh timeout something...i do not want to change my default ssh file settings ]
- Check some other things after ping status.So, that i do not fall in this condition and this server goes as failed in log file.
Please help me out. I am running out of idea's.