How to achieve secured data transfer through FTPS/SFTP
Joined: Aug 23, 2005
I have a requirement of uploading/downloading a file to/from server in my java application. Currently I am using Jakarta's commons.net.ftp APIs for it. Now the requirement is that this data transfer should be secured. So this FTP protocol should be replaced by either FTPS or SFTP. My question is - 1. FTPS is nothing but FTP over secured socket layer. So if server is changed to support FTPS then do I need to change my client API also or there is no need to change my client API which use commons.net.ftp API.
2. If I need to change client API also then which API I can use for FTPS and which API I can use for SFTP. I found some APIs(Secure FTP factory from JScape, edtFTPj/PRO from enterprisedt etc) but they all are not free.
Plz guide me how should I proceed.
Joined: Mar 22, 2005
Welcome to JavaRanch.
j-ftp does this with a GUI; if it doesn't have an API already, then it should be possible to build one for it, since the source is available.
I have tried JSch API (www.jcraft.com). But the problem is that when I tried to execute its example then it gave me following error. java.lang.NoSuchMethodError: java.net.InetAddress: method getByAddress([B)Ljava/net/InetAddress; not found at com.jcraft.jsch.PortWatcher.<clinit>(Unknown Source) at com.jcraft.jsch.Session.disconnect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.jcraft.jsch.Session.connect(Unknown Source) at com.ibm.jSch.sftp.Sftp.main(Sftp.java:48)
I found that JSch requires J2SE 1.4 or above (InetAddress is not supported in J2SE 1.3). But our application uses J2SE 1.3.
Please help me either by suggesting new API or by some work-around
Thanks in Advance.
Joined: Sep 26, 2005
this page mentions that the code will work if you install JCE along with jdk 1.3, which is available on sun's site.