I have multiple machines on which I want to execute a particular command. Some of those machines are possibly not
on the network. When I do sshconnection=ssh2_connect(suername,password,port) it works quickly for the machines
that are on the network but drags on forever when it hits a machine that is down. Is there a way to specify a timeout
for ssh2_connect (or for any php command, I guess) so that the script moves on instead of waiting.
thanks bunch in advance for all the replies.
ssh2_connect. How to specify the timeout
Moderator: General Moderators
Re: ssh2_connect. How to specify the timeout
Look into using rsync command, might help you out.
Re: ssh2_connect. How to specify the timeout
I also want to know how to specify the timeout for ssh2_connect. I did some manual tests and it appears to be one minute. This is very long and I would like to shorten it considerably.