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

camel-ftp: knownHostsUri configuration with camel 2.18.2

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.18.2
    • None
    • camel-ftp
    • None
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment