Hello, Im am trying to establish an SFTP connection to an SFTP Server (shell.sourceforge.net) with JCommander (jcommander.sourceforge.net), which uses the commons vfs. Unfortunately I always get a FileSystemExecption: "Could not connect to SFTP server at "shell.sourceforge.net: UnknownHostKey: shell.sourceforge.net". Other people are able to use JCommanders SFTP without any problems, but I don't know, what I am doing wrong.
Although I read the documentation, I do not yet fully understand the hostkey mechanism. Don't vfs create needed hostkeys on its own, possibly after asking? I think I have read somewhere, that hosts are saved in $HOME/.ssh/known_hosts. But this file does not exist, and creating it does not help either. I found the function SftpFileSystemConfigBuilder.setStrictHostKeyChecking(), but I did not find any information about how to use it, as JCommander uses the FileSystemManager VFS.getManager(). But actually I should not have to change anything in the code, as other people are able to uses it without problems. Any help would be very appreciated, Matthias |* <http://jakarta.apache.org/commons/vfs/apidocs/org/apache/commons/vfs/provider/sftp/SftpFileSystemConfigBuilder.html#setStrictHostKeyChecking%28org.apache.commons.vfs.FileSystemOptions,%20java.lang.String%29>*| --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
