I have a script that waits some time until a machine (being provisioned) comes up and then it connects to ssh and executes something. I use "sleep" for that.
I would like change my script to actively check the port in a bash loop and when it's ready (sshd is started and accepting connections) it would continue.
How to do that? Is there an UNIX command that is able to tell me if the TCP server port is responding?