I'm using ssh2_connect to execute a certain command on a group of servers.
The problem is that not all of them are necessarily on the network which
causes php script to execute for extended periods of time. Is there a way
to either specify a timeout on a command such as ssh_connect or
alternatively is there a command to check if a certain port (22 in my
case) is accepting connections. Then it's a simple matter of using if then
to execute the rest of the program.
thanks
The problem is that not all of them are necessarily on the network which
causes php script to execute for extended periods of time. Is there a way
to either specify a timeout on a command such as ssh_connect or
alternatively is there a command to check if a certain port (22 in my
case) is accepting connections. Then it's a simple matter of using if then
to execute the rest of the program.
thanks
Comment