This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8210f69505c Fix SSHHookAsync defaulting no_host_key_check to False 
unlike SSHHook (#64225)
8210f69505c is described below

commit 8210f69505ce5c45213ec82f0d993bf7677ba864
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Mar 25 21:48:28 2026 +0000

    Fix SSHHookAsync defaulting no_host_key_check to False unlike SSHHook 
(#64225)
    
    SSHHook (sync) defaults no_host_key_check=True, but SSHHookAsync
    defaults to False when the option is not set in connection extras.
    This causes SSHRemoteJobOperator to submit jobs successfully (via
    the sync hook on workers) but the triggerer fails to poll completion
    because the async hook rejects the host key.
    
    Align the async hook default with the sync hook so both skip host
    key verification when no_host_key_check is not explicitly configured.
---
 providers/ssh/src/airflow/providers/ssh/hooks/ssh.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py 
b/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py
index 4814569e4cf..7d5f29c4278 100644
--- a/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py
+++ b/providers/ssh/src/airflow/providers/ssh/hooks/ssh.py
@@ -598,7 +598,7 @@ class SSHHookAsync(BaseHook):
 
         host_key = extra_options.get("host_key")
         nhkc_raw = extra_options.get("no_host_key_check")
-        no_host_key_check = str(nhkc_raw).lower() == "true" if nhkc_raw is not 
None else False
+        no_host_key_check = str(nhkc_raw).lower() == "true" if nhkc_raw is not 
None else True
 
         if host_key is not None and no_host_key_check:
             raise ValueError("Host key check was skipped, but `host_key` value 
was given")

Reply via email to