I need to do check whether the remote machine is pinging so that i can do ssh to that machine and execute commands over there. how to do this check in perl?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Net::Ping, but this is a dumb way to go about it. If you want to connect with SSH, just do it, and handle the failure if you cannot.If a network interface responds to ping, this is no guarantee that SSH works. Conversely, SSH can work and ping is blocked.