stefanbirkner / fake-sftp-server-rule

A JUnit rule that runs an in-memory SFTP server.
MIT License
40 stars 26 forks source link

Known host file not configured, using user known host file: C:\Users\Sam/.ssh/known_hosts #13

Open MkJha opened 6 years ago

MkJha commented 6 years ago

Error while trying to do sftp.

Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Users\Sam.ssh\known_hosts (The system cannot find the path specified) at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:57) at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317) at org.apache.camel.component.file.remote.SftpOperations.createSession(SftpOperations.java:286) at org.apache.camel.component.file.remote.SftpOperations.connect(SftpOperations.java:115) ... 76 more

In actual sftp server it works fine , but on this mock , the connection could not get established

stefanbirkner commented 6 years ago

It looks like C:\Users\Sam.ssh\known_hosts is the wrong filename. I think C:\Users\Sam\.ssh\known_hosts is the correct filename.

stefanbirkner commented 3 years ago

IMO the problem is not related to Fake SFTP Server Rule. @MkJha where do you define the name of the known_hosts file?