'Establish an SSH connection to the node and run the provided deployment
task.
:rtype: :class:`.Node`:
:return: Node instance on success.'

def _connect_and_run_deployment_script(self, task, node, ssh_hostname, ssh_port, ssh_username, ssh_password, ssh_key_file, ssh_timeout, timeout, max_tries):

    ssh_client = SSHClient(hostname=ssh_hostname, port=ssh_port, username=ssh_username, password=ssh_password, key_files=ssh_key_file, timeout=ssh_timeout)
    ssh_client = self._ssh_client_connect(ssh_client=ssh_client, timeout=timeout)
    node = self._run_deployment_script(task=task, node=node, ssh_client=ssh_client, max_tries=max_tries)
    return node
