Skip to content

SSHHook warns that Remote Identification Change is not verified. when self.allow_host_key_change is set to False instead of when it is set to true #9510

@kkuzelka

Description

@kkuzelka

Apache Airflow version: 1.10.10

What happened:
for any ssh connection with allow_host_key_change set to False or unset Airflow prints

 WARNING - Remote Identification Change is not verified. This wont protect against Man-In-The-Middle attacks

What you expected to happen:

https://airflow.apache.org/docs/stable/howto/connection/ssh.html says

allow_host_key_change - Set to true if you want to allow connecting to hosts that has host key changed or when you get ‘REMOTE HOST IDENTIFICATION HAS CHANGED’ error. This wont protect against Man-In-The-Middle attacks. Other possible solution is to remove the host entry from ~/.ssh/known_hosts file. Default is false.

How to reproduce it:

    ssh_hook = SSHHook(ssh_conn_id=sftp_conn_id)
    sftp_client = ssh_hook.get_conn().open_sftp()

Let me know if I misunderstood how this should work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions