I'm having an application which needs to talk to a SFTP server running in Solaris.
The test case runs fine with the JSCH talking with the SFTP server outside the Websphere instance.
But when the application is deployed to the Websphere application server(v6.01) in my windows workstation
it just fails authenticating(saying com.jcraft.jsch.JSchException: Auth fail).I tried using username and password as well as the public-private key type authentication.Both authentication mechanisms work fine out side the application server. Can any one give some valuable clues to solve this problem.Is it required to tweak the webshere security to
enable SFTP to be working or some code changes are required?
Thanks in advance
Connection code as follows
JSch jsch = new JSch();
session = jsch.getSession(_user, _ftpHostUrl, SFTP_PORT);
Properties config = new Properties();
Channel channel = session.openChannel(SECURE_FTP);
ChannelSftp c = (ChannelSftp)channel;
Following commands were run in Solaris to generate the key pairs.
ssh-keygen -t rsa
cat id_rsa.pub >> authorized_keys