I am currently trying to access an Apache Kafka broker using Flink. Within my code, I configured the host IP to be 10.0.x.x which is an EC2 instance within a private subnet and can only be accessed through a bastion host. There is a working setup in ~/.ssh/config which tunnels all my SSH requests through the bastion, so I can access the machine by directly addressing the local IP. However, I am not sure, whether Eclipse or Java makes use of that, nor am I even sure who exactly would be responsible for that, the JVM or my IDE.
Do I have to go an extra mile and configure an explicit SSH tunnel in my Java application, e.g. with JSch, or should this already work and I messed something completely else up?