You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/23 01:42:12 UTC

[jira] [Commented] (CAMEL-8202) Excessive loggging: JSCH -> Permanently added 'X' (RSA) to the list of known hosts.

    [ https://issues.apache.org/jira/browse/CAMEL-8202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295828#comment-15295828 ] 

ASF GitHub Bot commented on CAMEL-8202:
---------------------------------------

GitHub user justinwrobel opened a pull request:

    https://github.com/apache/camel/pull/993

    camel-sftp: Permanently added 'X' (RSA) to the list of known hosts.

    This fixes the "Permanently added 'X' (RSA) to the list of known hosts."
    warning message by using the users home.
    
    This was fixed for ssh but not for sftp in CAMEL-8202
    
     * Updated sftp to use user's home .ssh/known_hosts file by default
     * 'Implemented' updateFileHeaders as log messages

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/justinwrobel/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/993.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #993
    
----
commit a11fc53c54e584e352c0d1d1c4c59e2a75260168
Author: Justin Wrobel <ju...@laureate.net>
Date:   2016-05-23T01:35:02Z

    camel-sftp: Permanently added 'X' (RSA) to the list of known hosts.
    
    This fixes the "Permanently added 'X' (RSA) to the list of known hosts."
    warning message by using the users home.
    
    This was fixed for ssh but not for sftp in CAMEL-8202
    
     * Updated sftp to use user's home .ssh/known_hosts file by default
     * 'Implemented' updateFileHeaders as log messages

----


> Excessive loggging: JSCH -> Permanently added 'X' (RSA) to the list of known hosts.
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-8202
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8202
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jsch
>    Affects Versions: 2.13.2
>         Environment: Linux, Tomcat, Camel
>            Reporter: Richard O'Sullivan
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: Logging, SSH
>             Fix For: 2.15.0
>
>
> 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...
> {code:java}
> DEFAULT_KNOWN_HOSTS = "META-INF/.ssh/known_hosts". 
> {code}
> But this causes excessive logging with the misleading message:
> {code:none}
> JSCH -> Permanently added 'X' (RSA) to the list of known hosts.
> {code}
> 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:
> {code:xml}
> knownHostsFile={{user.home}}/.ssh/known_hosts
> {code}
> FIX: Change the default to be the ".ssh/known_hosts" file in the user's home path. In [ScpOperations.java|https://github.com/apache/camel/blob/master/components/camel-jsch/src/main/java/org/apache/camel/component/scp/ScpOperations.java], the declaration becomes...
> {code:java}
> private static final String DEFAULT_KNOWN_HOSTS;
> static { DEFAULT_KNOWN_HOSTS = System.getProperty("user.home") + "/.ssh/known_hosts"; }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)