Hi All,
I have been using jsch to transfer files from my linux server to other linux
machines using authentication key files.
But now I am trying to transfer files from my linux server to other windows
machines using authentication key files.....But I keep getting auth fail
error.
Please find below the sample code......
*String ftpHost = "165.89.37.115";*
*int ftpPort = 22;*
*String ftpUserName = "ascde";*
*String ftpPassword = "abcdef";*
*String ftpRemoteDirectory = "C:\\";*
*String fileToTransmit = "/abc/xyz/x.txt";*
*// state of SSH connection*
*JSch jsch = new JSch();*
*jsch.addIdentity("C:\\admin_rsa");*
*Session session = jsch.getSession(ftpUserName, ftpHost, ftpPort);*
*System.out.println("Session created.");*
*java.util.Properties propConfig = new java.util.Properties();*
*propConfig.put("StrictHostKeyChecking", "no");*
*session.setConfig(propConfig); *
*session.connect();*
*
*
There is an ssh service running on the windows server which is
OpenSSH/CopSSH.
*
*
any help would be appreciated.
Thanks,
Deepesh
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users