triptec commented on a change in pull request #12944:
URL: https://github.com/apache/airflow/pull/12944#discussion_r543250793
##########
File path: airflow/providers/sftp/hooks/sftp.py
##########
@@ -109,12 +111,22 @@ def __init__(self, ftp_conn_id: str = 'sftp_default',
*args, **kwargs) -> None:
)
self.key_file = extra_options.get('private_key')
+ if "host_key" in extra_options and self.no_host_key_check is
False:
+ encoded_host_key =
decodebytes(extra_options["host_key"].encode('utf-8'))
+ self.host_key = paramiko.RSAKey(data=encoded_host_key)
+
Review comment:
Yeah, you're right, I missed that part.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]