'test ssh connection failed in airflow

we have added ssh connection in airflow connections, while testing it we get error like 'Hook SSHHook doesn't implement or inherit test_connection method'

ssh hook error



Solution 1:[1]

Test button in the UI works only with Hooks that implemented test_connection. This means that you can not test the connection with the UI and you will have to create some DAG to test it.

In newer airflow versions the button will be disabled for connections/hooks that doesn't support this functionality (See PR)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elad Kalif