I need to use SpringBoot (2.7.x) SFTP Adapter (spring-integration-sftp) to estabilish SFTP file transfer over SSH tunnelling.
The solution i've found (based on SSH tunneling via JSch) is to create a SSH connection via JSch and then to use spring SFTP adapter to connect the JSch session via port forwarding, hence:
- JSch session between remotehost:22 and localhost:1234
- SFTP Adapter to localhost:1234
I'm wondering if there is some better/other way to achieve this for example with a proper configuration of Spring SFTP Adapter (some example?) or with some other Springboot library that gives this feature out of the box.