有没有办法通过 ssh 连接到服务器并使用 Airflow 运行 PythonOperator?我看起来像 SSHExecuteOperator 但不是执行 bash 命令而是执行 python 可调用。
请您参考如下方法:
它的ssh隐私问题
- 转到您的主机 ssh 服务器并运行
ssh-keygen -t rsa并一直按回车键 - 您将获得 2 个 rsa 文件。将该文件复制到 airflow env 并复制其完整路径
The Just add the below in your connection from the airflow UI
{"key_file": "/usr/local/airflow/.ssh/id_rsa.pub", "no_host_key_check": true}重新编译DAG并运行
