From f3fdf3bd9357f3859cd452ba30ee4cec2c9db70f Mon Sep 17 00:00:00 2001 From: Michael Carson Date: Wed, 16 Mar 2022 16:39:47 -0400 Subject: [PATCH] Update ssh.py Incorrect logic for self.allow_host_key_change warning regarding "Remote Identification Change is not verified" This was identified in https://github.com/apache/airflow/issues/9510 --- airflow/providers/ssh/hooks/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/providers/ssh/hooks/ssh.py b/airflow/providers/ssh/hooks/ssh.py index 50ea15f276493..f6001534493bb 100644 --- a/airflow/providers/ssh/hooks/ssh.py +++ b/airflow/providers/ssh/hooks/ssh.py @@ -266,7 +266,7 @@ def get_conn(self) -> paramiko.SSHClient: self.log.debug('Creating SSH client for conn_id: %s', self.ssh_conn_id) client = paramiko.SSHClient() - if not self.allow_host_key_change: + if self.allow_host_key_change: self.log.warning( "Remote Identification Change is not verified. " "This won't protect against Man-In-The-Middle attacks"