Can I use Airflow to open an SSH tunnel into one of our databases?


How can we setup Mongo DB and MySQL connections with an SSH tunnel? When I’m executing my python scripts on my windows server the tunnel into our databases already exists, but it’s not currently a part of our airflow environment.


We’ve had a few customers with certain security restrictions need to open an SSH tunnel as a part of their workflow.

Here’s an example of accessing a Postgres database using SSH:

Feel free to also check out a case study on how one of our customers syncs their application database to their data warehouse whilst incorporating SSH tunneling to do so. Descriptions of our product + features are a bit outdated, but it might give you an idea of what your workflows could look like.