want free java api's for ftp over ssh

Hi all

I have to write java code for ftp over ssh.

I am serching for free java api's for secure ftp

i found api's but all paid

can any one please tell me about free availble api's

[215 byte] By [prithvi123a] at [2007-11-27 10:56:14]
# 1

Try JSch (with JZlib) from jcraft http://www.jcraft.com/. It is an, essentially, complete SSH2 implementation as a Java API, and one of the examples provided (if I remember right) is an sftp command line tool (or at least an scp command line tool which scp is, of course, set up on sftp).

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 2

are these api's are free? :(

prithvi123a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 3

Look at the web page.

Yes. Gnu Public License, if I remember right.

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 4

fyi

The JSch supports sftp, but sftp is not ftp over ssh, unfortunately.

Sincerely,

--

Atsuhiko Yamanaka

JCraft,Inc.

1-14-20 HONCHO AOBA-KU,

SENDAI, MIYAGI 980-0014 Japan.

Tel +81-22-723-2150

+1-415-578-3454

Fax +81-22-224-8773

Skype callto://jcraft/

prithvi123a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 5

It is still capable of doing what you want. It is not an actual FTP protocol, but it does allow and perform file transfers. You just need to handle more of the "protocol" yourself. And since you are doing it programmatically, what difference does it make?

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 6

> It is still capable of doing what you want. It is

> not an actual FTP protocol, but it does allow and

> perform file transfers. You just need to handle more

> of the "protocol" yourself. And since you are doing

> it programmatically, what difference does it make?

If it doesn't do the correct protocol then it doesn't provide any more benefit than just using straight ftp.

And obviously it will make a difference if the specific protocol is required.

jschella at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 7

> If it doesn't do the correct protocol then it doesn't

> provide any more benefit than just using straight

> ftp.

>

> And obviously it will make a difference if the

> specific protocol is required.

What I am getting at, is that I am sure what he wants to do is simply copy files from one machine to another using ssh. sftp will accomplish this with no problem whatsoever. If he actually needs ftp over ssh (i.e. he is attempting to get theings from an ftp over ssh server) then no, but I don't believe that that is what he actually wants.

If he wants real ftp over ssh, then he can still accomplish it using the jcraft api, he would have to setup his own tunnels (which it can do) then use the normal ftp api to connect to those tunneled ports locally.

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 8

if you have a real business need to support this, you will have the resources available to pay for the tools required (or have a project manager who should be able to get those resources)...

jwentinga at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 9

@OP

JScape makes a good SecureFTP Java API that does FTPS, SFTP, and SCP. It is not free, but it is also not overly expensive. If actual FTP over SSH is a real necessity for you, then I would suggest the JScape API.

Although, as I mentioned, you could try to roll it yourself with a regular ftp api and ssh tunneling with JSch (or another SSH API).

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 10

> > If it doesn't do the correct protocol then it

> doesn't

> > provide any more benefit than just using straight

> > ftp.

> >

> > And obviously it will make a difference if the

> > specific protocol is required.

>

> What I am getting at, is that I am sure what he wants

> to do is simply copy files from one machine to

> another using ssh. sftp will accomplish this with no

> problem whatsoever. If he actually needs ftp over

> ssh (i.e. he is attempting to get theings from an ftp

> over ssh server) then no, but I don't believe that

> that is what he actually wants.

The problem is that there is at least three 'standard' ways to securely move files via ftp. And there are variations for each of those.

And if you need a particular one, because for example that is the only one that the target server supports, then no other implementation will work.

Here is one source that discusses some of the protocols.

http://winscp.net/eng/docs/protocols

jschella at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 11

> The problem is that there is at least three

> 'standard' ways to securely move files via ftp. And

> there are variations for each of those.

>

Which, if you read my previous post, I am well aware of. He mentioned FTP over SSH though, not over SSL, and not SCP, and not standard FTP.

FTP over SSH and SCP and simple sftp (the one included directly in SSH which is not FTP at all, but is used for file transfers), can all be accomplished with jcraft, but the first one can be extremely tricky. Which is also the reason that I suggested investing a little something and uses JScape.

masijade.a at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...
# 12

> > The problem is that there is at least three

> > 'standard' ways to securely move files via ftp.

> And

> there are variations for each of those.

>

>

> Which, if you read my previous post, I am well aware

> of. He mentioned FTP over SSH though, not over SSL,

> and not SCP, and not standard FTP.

>

> FTP over SSH and SCP and simple sftp (the one

> included directly in SSH which is not FTP at all, but

> is used for file transfers), can all be accomplished

> with jcraft, but the first one can be extremely

> tricky. Which is also the reason that I suggested

> investing a little something and uses JScape.

I was responding to reply #5. And an author of the the product you suggested said it wouldn't work.

Your suggestion of another solution is not what I was responding to.

jschella at 2007-7-29 12:01:45 > top of Java-index,Core,Core APIs...