10

The "jsch" based implementation works for me.
But it looks not modern one due to using Vector (old style Java collection).
I found that the other implementations are less popular and not documented.
Can you recommend implementation of SFTP library that he/she has good experience with it.
Thanks.

Boris
  • 305
  • 2
  • 15

6 Answers6

4

It works. Who cares if it uses Vector? It's by far the most popular one. In fact, it's the only one I can think of without resorting to Google.

dty
  • 18,795
  • 6
  • 56
  • 82
  • http://stackoverflow.com/questions/1386275/why-java-vector-class-is-considered-obsolete-or-deprecated – Boris Oct 07 '10 at 09:49
  • Did you have a point? I know Vector is synchronised. But: a) the synchronisation overhead is virtually zero on a modern JVM with uncontended locks, and b) you're talking about a handful of extra processor cycles compared to the burden of network comms with encryption. – dty Oct 07 '10 at 17:23
  • Also, the Vector is not really used in the performance-critical sections, if you don't have zillions of identities and are opening new connections the whole time. – Paŭlo Ebermann Jun 08 '11 at 00:29
4

There is a newer "version" of Jsch on github. It is a vast improvement to the existing library in many ways. Check out the README on the site and the comprehensive javadoc for more information. https://github.com/vngx/vngx-jsch. It's also available on most major maven repos and it's OSGi compatible. There are quite a few alternatives, but this one is solid and I believe the most up-to-date (spec/code/docs). Disclaimer: I am a contributor.

Scott
  • 1,012
  • 7
  • 14
  • I just today found this ... and see that you did some of the same things I did, too, with my [jsch-documentation](http://github.com/epaul/jsch-documentation) version (which does not change any functionality, mainly adds documentation). I think that the main reason the original JSch is not updated to use modern classes, generics and such is that it still should be usable with old VMs (and low-end devices, too). – Paŭlo Ebermann Jun 08 '11 at 00:23
  • Also, did you try to contact the original author? There is an [active mailing list](http://sourceforge.net/mailarchive/forum.php?forum=jsch-users). – Paŭlo Ebermann Jun 08 '11 at 00:27
  • We are more concerned with performance and code quality than legacy support. Not to mention anything can be easily retroweaved as needed. There are many bug fixes and usability enhancements in addition to performance improvements and spec adherence. It is mostly re-written internally, but with an api that will be comfortable for users of jsch, and since the code base originated from jsch we pay some homage by including it in the name. We didn't contact anyone this is a completely independent fork of the project. – Scott Jun 09 '11 at 19:59
  • Do you have some performance measures in comparison to JSch? – Paŭlo Ebermann Jun 09 '11 at 22:41
3

As @dty said, as long as your application can work smoothly why do you care for the usage of deprecated classes/methods in the library ?

You only need to care about what you're calling, not how does it work in the inside.
You can also use abstraction tools above JSch, but it won't change a thing.

You can also check for JSch alternatives, but as JSch is widely used you'll have probably less bugs with it.

Community
  • 1
  • 1
Colin Hebert
  • 91,525
  • 15
  • 160
  • 151
  • 1
    The problem with old SSH implementations is that such implementation usually don't work well with later versions of SSH server software. So maintenance for better compatibility must be provided and this is what open-source implementations fail to offer. – Eugene Mayevski 'Callback Oct 07 '10 at 07:53
  • The clue's in the name... if it's open-source and you want a new feature to support "later versions of SSH server software", then just implement it yourself. – dty Oct 07 '10 at 17:24
1

I have used this library https://github.com/shikhar/sshj/. Its has got an excellent API [Requires Java 6].

Venkata Raju
  • 4,866
  • 3
  • 27
  • 36
1

You may also want to take a look at IP*Works! SSH from /n software.

Spencer
  • 451
  • 4
  • 4
0

A cheaper commercial alternative (my own product, for disclosure), is edtFTPj/PRO.

Bruce Blackshaw
  • 986
  • 1
  • 7
  • 10