import socket


def scan_port(host, port):
    """Try to establish connection to the host on a given port. If successful, the port is open."""
    try:
        socket.create_connection((host, port))
        return "Open"
    except Exception as e:
        return "Closed: %s" % e