ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SFTP from JavaCompute Node

Post new topic  Reply to topic
 SFTP from JavaCompute Node « View previous topic :: View next topic » 
Author Message
paranoid221
PostPosted: Fri Sep 12, 2008 10:00 am    Post subject: SFTP from JavaCompute Node Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

Here's a scenario buddies.
In a broker flow I was reading a file from a directory on the broker box to get some data. This directory is actually an NFS mount of another directory on a remote machine. The corporate data security team has decided to do away with NFS mounts since it does not ensure data security.
So now I have to modify my flow to include SFTP calls to the remote machine to read the file. FTP is already pushed out as an option and hence I cannot use the File nodes in 6.1 which means I have to invariably do this in a JavaCOmpute node. From the googling I've done so far, writing Java code to make SFTP calls is not as straight forward as it is for FTP calls. Java has native support for FTP but it doesnot provide an API sort of thing to make SFTP calls. There are a couple of freeware Java libraries (Jcraft JSCH etc..) out there but Iam pretty sure they won't let me use any of those. SFTP server is built into AIX, and to validate this I logged into the broker AIX box and successfully SFTP'ed a couple of files onto another AIX machine.
Given the above information, how do I start writing the Java Code in JavaCompute node to make an SFTP call to a remote machine.
Any thoughts on this??
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 12, 2008 11:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

SFTP for java is pretty much the same as FTP but using an SSL socket implementation.... Have you looked at http://j-ftp.sourceforge.net/?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
paranoid221
PostPosted: Fri Sep 12, 2008 1:27 pm    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

Heyy saper,
Are you suggesting to use the jftp source code as my starting point for using the API exposed by it and build my classes for implementing in broker?
If yes, then I suppose it cannot happen. The client I'm working with are against the usage of open source software (there are a few exceptions and even in those cases the open source package needs to go through their rigorous 1 year long testing cycle).

I was trying to see if I can write the code in a JavaCompute node to make an SFTP call without using any third party library.
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Sep 12, 2008 2:01 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

paranoid221 wrote:
Heyy saper,
Are you suggesting to use the jftp source code as my starting point for using the API exposed by it and build my classes for implementing in broker?
If yes, then I suppose it cannot happen. The client I'm working with are against the usage of open source software (there are a few exceptions and even in those cases the open source package needs to go through their rigorous 1 year long testing cycle).

I was trying to see if I can write the code in a JavaCompute node to make an SFTP call without using any third party library.


I just thought that it might give you interesting pointers to write your stuff as the source code is usually accessible, and you might not have to go through a year long approval process for something you wrote.... Sorry for them forcing you to reinvent the wheel.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
paranoid221
PostPosted: Fri Sep 12, 2008 2:10 pm    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

Ah.. I can see where you are coming from.
I've already gone that approach and still investigating. I got the JSCH library from JCraft.com, decompiled the classes to get the source code to see how its being done. That package seems to have been built from the ground up in the sense that you'll see all kinds of low level implementations inside it.
More specifically, you'll see that there is session handling/management classes, buffer management, socket management etc. At the higher levels there are classes to manage and work with user credentials and other auth types.
I've put in a request to see if my organization has any approved SFTP libraries for developers to build SFTP clients on. Lets see how far that gets me. Otherwise, I'll put in a request to the environment team to start evaluating/researching the free libraries and the commercial variants like JScape Secure FTP Factory.
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
Back to top
View user's profile Send private message
paranoid221
PostPosted: Thu Oct 16, 2008 9:29 pm    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

Finally found my way through this. All convincing at the higher levels said and done.
The outcome:
I've used the open source TrileadSSH for Java, imported into my project as an external jar and used the API exposed by it.
I've also considered JFTP and JSCH but they appeared to be very crude and rudimentary.
SSHTools was also an awesome libray if you want to build SFTP clients using Java and was a pretty fierce competitor to the Trilead package. The tie-breaker really was the type of open source license each one came with. SSHTools is a GPL type license which is considered as not-so-opensource-friednly.
Trilead is distributed with a BSD style licence and hence gets a big Thumbs-up
Trilead is very easy to use and works like a charm.
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
Back to top
View user's profile Send private message
IntegratorWMB
PostPosted: Wed Oct 22, 2008 6:53 am    Post subject: Reply with quote

Apprentice

Joined: 06 Dec 2007
Posts: 27

There is 3rd party product available as a node/ Extenstion for message broker.

URL : http://www.primeur.com/products/system_integration/spazio/spazio-file-extender-wmb.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SFTP from JavaCompute Node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.