try{ // pipeline //String prvKeyPath = "IS_SSH/properties/intserv.rsa"; IDataCursor pipelineCursor = pipeline.getCursor(); String ftpHost = IDataUtil.getString( pipelineCursor, "ftpHost" ); int ftpPort = Integer.parseInt(IDataUtil.getString( pipelineCursor, "ftpPort" )); String ftpUserName = IDataUtil.getString( pipelineCursor, "ftpUserName"); String prvkeyStr = IDataUtil.getString( pipelineCursor, "ftpPrvKey"); String ftpPassPhrase = IDataUtil.getString( pipelineCursor, "ftpPassPhrase"); pipelineCursor.destroy(); //char[] prvkeyChar = null; //FileReader fr = new FileReader(prvKeyPath); //fr.read(prvkeyChar); //fr.close(); //String prvkeyStr = new String(prvkeyChar); //prvkeyChar = null; byte[] prvkey = prvkeyStr.getBytes(); byte[] PassPhrase = ftpPassPhrase.getBytes(); //prvkeyStr = null; String status = null; //final byte[] ftpPassPhrase = new byte[0]; //First Create a JSch session JSch jsch = new JSch(); //jsch.addIdentity(prvkeyStr); jsch.addIdentity( ftpUserName, // String userName prvkey, // byte[] privateKey null, // byte[] publicKey PassPhrase ); // byte[] passPhrase Session session = null; Channel channel = null; ChannelSftp c = null; //Now connect and SFTP to the SFTP Server // try { //Create a session sending through our username and password session = jsch.getSession(ftpUserName, ftpHost, ftpPort); session.connect(); // //Open the SFTP channel // channel = session.openChannel("sftp"); channel.connect(); c = (ChannelSftp)channel; status = "OK"; } catch (Exception e) { status = "Unable to connect to FTP server. "+e.toString(); } // pipeline IDataCursor pipelineCursor_1 = pipeline.getCursor(); IDataUtil.put( pipelineCursor_1, "ChannelSftp", c); IDataUtil.put( pipelineCursor_1, "SessionFactory", session); IDataUtil.put(pipelineCursor_1, "status", status); pipelineCursor.destroy(); } catch(Exception e){ new ServiceException(e.getStackTrace().toString()); } ---------------- Source: public static class MyUserInfo implements UserInfo { public String getPassword() { return "password"; } public String getPassphrase() { return ""; } public boolean promptPassword(String arg0) { return true; } public boolean promptPassphrase(String arg0) { return true; } public boolean promptYesNo(String arg0) { return true; } public void showMessage(String arg0) {} } public static String getFileName(String path){ String fileName = null; String separator = File.separator; int pos = path.lastIndexOf(separator); int pos2 = path.lastIndexOf("."); if(pos2>-1) fileName =path.substring(pos+1, path.length()); else fileName =path.substring(pos+1); return fileName; } public static void logMsg(String msg, int lvl) { JournalLogger.log(3, JournalLogger.FAC_FLOW_SVC, lvl, msg); return; } --------------------------- Imports: com.jcraft.jsch.* java.util.Properties java.io.FileReader com.wm.util.JournalLogger java.io.*