commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stuart Rossiter" <Stua...@htk.co.uk>
Subject RE: [VFS] Known hosts checking for SFTP Ant tasks?
Date Fri, 07 Jul 2006 12:49:01 GMT


 
Thanks Mario. Got a better trace out of this now.

>> Any advice would be appreciated. In particular, is there no way to
get
>> the full Java error trace, rather than just this generic error
message?
>>   
>Start trying with a simple java class.
>
>Something like:
>
>FileObject fo = VFS.getManager().resolveFile("sftp:// .....");
>fo.getContent().getLastModificationTime();
>
>That way you should get a better stacktrace.

This *is* a hosts key problem - see error trace below:

org.apache.commons.vfs.FileSystemException: Could not connect to SFTP
server at "sftp://test:test@localhost/".
	at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem
(SftpFileProvider.java:87)
	at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile
(AbstractOriginatingFileProvider.java:76)
	at
org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile
(AbstractOriginatingFileProvider.java:61)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(Default
FileSystemManager.java:524)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(Default
FileSystemManager.java:488)
	at
org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(Default
FileSystemManager.java:458)
	at testSFTP.main(testSFTP.java:10)
Caused by: org.apache.commons.vfs.FileSystemException: Could not connect
to SFTP server at "localhost".
	at
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(
SftpClientFactory.java:172)
	at
org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem
(SftpFileProvider.java:79)
	... 6 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: localhost. RSA
key fingerprint is bc:0c:51:32:f2:38:d7:46:3b:f2:a3:02:cb:f1:6e:11
	at com.jcraft.jsch.Session.checkHost(Unknown Source)
	at com.jcraft.jsch.Session.connect(Unknown Source)
	at com.jcraft.jsch.Session.connect(Unknown Source)
	at
org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(
SftpClientFactory.java:168)
	... 7 more
Exception in thread "main"

So the questions remains! In the "black box" Ant task implementation,
where is the code looking for the known_hosts file (running on Windows
XP)??

Thanks for any further help,  Stuart


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. http://www.messagelabs.com
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message