I was developing SFTP code using JSch.
I initially started using ChannelExec but I faced some issues with it. I switched to ChannelSftp and it worked beautifully. I