import logging


def check_connection(ssh_conn):
    """
    This will check if the connection is still available.

    Return (bool) : True if it's still alive, False otherwise.
    """
    try:
        ssh_conn.exec_command("ls", timeout=5)
        return True
    except Exception as e:
        logging.error(
            "unable to execute a simple command on remote connection. Error: {}".format(
                e.__str__()
            )
        )
        return False