File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes How to achieve secured data transfer through FTPS/SFTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How to achieve secured data transfer through FTPS/SFTP" Watch "How to achieve secured data transfer through FTPS/SFTP" New topic
Author

How to achieve secured data transfer through FTPS/SFTP

Brijesh Kadecha
Greenhorn

Joined: Aug 23, 2005
Posts: 2
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
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.


Ping & DNS - my free Android networking tools app
Brijesh Kadecha
Greenhorn

Joined: Aug 23, 2005
Posts: 2
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.
Aalok Pandit
Greenhorn

Joined: Sep 26, 2005
Posts: 15
brijesh

this page mentions that the code will work if you install JCE along with jdk 1.3, which is available on sun's site.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to achieve secured data transfer through FTPS/SFTP