Hi,

i have downloaded commons-vfs-20031106.tar.gz
and compiled in on Linux 2.4.21 with SUN JDK 1.4.1.

I need to use the scp feature with 'sftp'.
Is there any tutorial how to setup everything?

Here is my problem:

/opt/commons-vfs> java org.apache.commons.vfs.example.Shell

> cp LICENSE.txt ftp://mrf:[EMAIL PROTECTED]/LICENSE.txt

(normal copy works fine!)

> cp LICENSE.txt sftp://mrf:[EMAIL PROTECTED]/LICENSE.txt
com.jcraft.jsch.JSchException: UnknownHostKey
at com.jcraft.jsch.Session.checkHost(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:120)
at org.apache.commons.vfs.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:138)
at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:104)
at org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:919)
at org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:372)
at org.apache.commons.vfs.example.Shell.cp(Shell.java:215)
at org.apache.commons.vfs.example.Shell.handleCommand(Shell.java:151)
at org.apache.commons.vfs.example.Shell.go(Shell.java:127)
at org.apache.commons.vfs.example.Shell.main(Shell.java:90)
Command failed:
org.apache.commons.vfs.FileSystemException: Could not determine the type of file "sftp://mrf:[EMAIL PROTECTED]/LICENSE.txt".
at org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:931)
at org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:372)
at org.apache.commons.vfs.example.Shell.cp(Shell.java:215)
at org.apache.commons.vfs.example.Shell.handleCommand(Shell.java:151)
at org.apache.commons.vfs.example.Shell.go(Shell.java:127)
at org.apache.commons.vfs.example.Shell.main(Shell.java:90)
Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://mrf:[EMAIL PROTECTED]/".
at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:140)
at org.apache.commons.vfs.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:138)
at org.apache.commons.vfs.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:104)
at org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:919)
... 5 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey
at com.jcraft.jsch.Session.checkHost(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
at org.apache.commons.vfs.provider.sftp.SftpFileSystem.getChannel(SftpFileSystem.java:120)
... 8 more
>


Any idea about the "UnknownHostKey"?

thanks,

Marcel

PS: The pure jsch-0.1.8/examples works fine:

java ScpTo XY [EMAIL PROTECTED]:XY

PPS: Does VFS work with http://www.sshtools.com/

--


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to