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

Excessive loggging: JSCH -> Permanently added 'X' (RSA) to the list of known hosts.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.13.2
    • 2.15.0
    • camel-jsch
    • Linux, Tomcat, Camel

    • Novice

    Description

      A previous issue, CAMEL-5242, "Add support for pki based auth in camel-jsch" defined the default location of the SSH known_hosts file to be...

      DEFAULT_KNOWN_HOSTS = "META-INF/.ssh/known_hosts". 
      

      But this causes excessive logging with the misleading message:

      JSCH -> Permanently added 'X' (RSA) to the list of known hosts.
      

      It is misleading because the addition is not permament. It repeats with every SFTP connection. It is logged as a WARN which creates unnecesary review and filtering when analyzing the log files.

      Although it is possible to configure the SFTP endpoint to specify the location of the common known_hosts file location, this must be added to every SFTP endpoint deployed to a Camel engine. For example, in a Spring XML/DSL the additional option is:

      knownHostsFile={{user.home}}/.ssh/known_hosts
      

      FIX: Change the default to be the ".ssh/known_hosts" file in the user's home path. In ScpOperations.java, the declaration becomes...

      private static final String DEFAULT_KNOWN_HOSTS;
      static { DEFAULT_KNOWN_HOSTS = System.getProperty("user.home") + "/.ssh/known_hosts"; }
      

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              richaosu Richard O'Sullivan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: