I am facing problem to create a session to a remote SFTP server by JSch:
The command i use to connect the sftp server through shell is:
sftp -o BindAddress=SOME_IP_ADDRRESS myUserName@HOST_IP_ADDR
and its working fine, but when I am trying with Java (JSch) then I am getting a timeout exception. The Java code is
/* KEY_FILE_NAME = is a file with rsa public key */
ClassLoader classLoader = getClass().getClassLoader();
File file = new File(classLoader.getResource(KEY_FILE_NAME).getFile());
JSch jsch = new JSch();
jsch.addIdentity(file.getAbsolutePath());
Properties hash = new Properties();
hash.put("StrictHostKeyChecking", "no");
logger.debug("SSh Server Host name >>" + SSH_SERVER_HOST_NAME + " || User Name >>" + SSH_SERVER_USER_