Airflow bastion ssh config
30 Apr 2018
A sample config for connecting to Airflow UIs using a bastion host in the middle.
ssh config :
Host dev-bastion
 HostName 10.69.7.20
 User rchamarthi
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/rchamarthi.pem
Host dev-airflow-rchamarthi
 HostName 10.69.1.245
 User rchamarthi
 PreferredAuthentications publickey
 IdentityFile ~/.ssh/rchamarthi.pem
 ServerAliveInterval 15
 TCPKeepAlive yes
 Protocol 2,1
 # redis
 LocalForward 16379 localhost:6379
 # airflow ui
 LocalForward 18081 localhost:8081
 # airflow ui rchamart
 LocalForward 18082 localhost:8082
 # flower ui
 LocalForward 15555 localhost:5555
 ProxyCommand ssh dev-bastion -W %h:%p
If you are on windows.
- convert your pem file to ppk using putty gen. Load pem and then click “save private key” an save the file as .ppk


- 
    Don’t forget to save your session after you load your key. 
- 
    Click yes to continue to cache the key. 

- Now the actual server that you want to connect to by hopping on to Bastion 👍

C:\Program Files\PuTTY\plink.exe” dev-bastion -agent -nc %host:%port