def ssh_avail(self):
        remote = socket.socket()
        remote.settimeout(1)
        try:
            remote.connect((self.ip, self.SSH_PORT))
            ready = select.select([remote], [], [], 0) # poll
            if not ready:
                # no data
                return False
            data = remote.recv(256)
            if not data.startswith("SSH"):
                # Something else is listening on that port
                return False
            return True

        except socket.error, e:
            return False

        finally:
            remote.close()
Is ssh available?
dataset/ETHPy150Open bmbouter/Opus/opus/lib/ssh_tools.py/NodeUtil.ssh_avail