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

Closed

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.

Activity

  1. boring-cyborg commented on Jun 25, 2020

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. zhangyi-hu commented on Nov 9, 2020

    @zhangyi-hu
    Contributor

    I'm still seeing this in 1.10.12

  3. added a commit that references this issue on Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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