commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Barrett" <>
Subject [VFS] sftp problems
Date Wed, 11 Jun 2003 17:33:25 GMT

I'm trying to get the sftp provider to work, but I'm running into problems.

I'm using jdk1.3, jce1.2.2, vfs HEAD, and I've tried jsch 0.1.2 (specified in vfs project.xml)
and 0.1.5 (the most current).  I also tried using jce from bouncycastle (
to no avail.

I've tried connecting to two different linux servers both running ssh2 is installed on both
machines and I'm able to do a commandline connection using sftp, so I know that works.

I'm trying to get the sftp test case to pass, and that's where the errors are coming from.
 Line 198 in ProviderTestSuite tries to check and see if the test url specified exists.  Eventually
this leads to line 108 in SftpFileSystem, which basically calls Session.connect() on an Sftp
Session.  Everything seems peachy until line 52 in com.jcraft.jsch.jce.DH which looks like


This is apparently a  This barfs with this message: "DH KeyPairGenerator
not available".  

This exception then leads to other down stream issues resulting in a NPE:

	at com.jcraft.jsch.jce.DH.getE(
	at com.jcraft.jsch.jce.DHG1.init(
	at com.jcraft.jsch.Session.receive_kexinit(
	at com.jcraft.jsch.Session.connect(
	at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(
	at org.apache.commons.vfs.provider.sftp.SftpFileObject.statSelf(
	at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetType(
	at org.apache.commons.vfs.provider.AbstractFileObject.attach(
	at org.apache.commons.vfs.provider.AbstractFileObject.exists(
	at org.apache.commons.vfs.test.ProviderTestSuite.setUp(
	at junit.extensions.TestSetup$1.protect(
	at junit.framework.TestResult.runProtected(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

Has anyone come across this?  I peeked at the KeyPairGenerator.getInstance() docs, and it
looks like DH isn't a valid option.  This doesn't seem to be an issue for lots of other people
though, a google search reveals lots of code on the net with the line: KeyPairGenerator.getInstance("DH").


The information in this email and subsequent attachments may contain confidential information
that is intended solely for the attention and use of the named addressee(s). This message
or any part thereof must not be disclosed, copied, distributed, or retained by any person
without the authorization from the addressee.


View raw message