Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10946

camel-ftp: knownHostsUri configuration with camel 2.18.2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.18.2
    • Fix Version/s: None
    • Component/s: camel-ftp
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I have a known_hosts file in \src\main\resources and I want the ftp-component to use this known_hosts file when connecting to an sftp server (and not be dependent on the ~/.ssh/known_hosts file).
      When using this option (in combination with the option useUserKnownHostsFile=false), camel starts up fine

      if (isNotEmpty(sftpConfig.getKnownHostsFile())) {

      is being triggered from SftpOperations.java and I can see that useUserKnownHostsFile and knownHostsFile is set correctly - seen in this picture:

      However when some files are added to SFTP server and

      if (isNotEmpty(sftpConfig.getKnownHostsFile())) {

      triggers then the values are overridden:

      In logs I see these repeating lines each time a file is added to SFTP server:

      ..
      {"@timestamp":"2017-03-06T13:02:04.016+02:00","@version":1,"message":"JSCH -> Permanently added '10.xx.x.xxx' (RSA) to the list of known hosts.","logger_name":"org.apache.camel.component.file.remote.SftpOperations"
      {"@timestamp":"2017-03-06T13:02:04.016+02:00","@version":1,"message":"Server asks for confirmation (yes|no): C:\\Users\\francis.zarins/.ssh/known_hosts does not exist.\nAre you sure you want to create it?. Camel will answer no.",
      ..
      {"@timestamp":"2017-03-06T13:02:35.320+02:00","@version":1,"message":"JSCH -> Permanently added '10.xx.x.xxx' (RSA) to the list of known hosts."
      {"@timestamp":"2017-03-06T13:02:35.336+02:00","@version":1,"message":"Server asks for confirmation (yes|no): C:\\Users\\francis.zarins/.ssh/known_hosts does not exist.\nAre you sure you want to create it?. Camel will answer no.",
      ..
      

        Attachments

        1. Capture.PNG
          5 kB
          Francis
        2. Capture1.PNG
          5 kB
          Francis

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                fzarins Francis
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: