Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB5DA104B2 for ; Wed, 31 Dec 2014 17:18:13 +0000 (UTC) Received: (qmail 33325 invoked by uid 500); 31 Dec 2014 17:18:14 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 33295 invoked by uid 500); 31 Dec 2014 17:18:14 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 33283 invoked by uid 99); 31 Dec 2014 17:18:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2014 17:18:14 +0000 Date: Wed, 31 Dec 2014 17:18:14 +0000 (UTC) From: "Richard O'Sullivan (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-8202) Excessive loggging: JSCH -> Permanently added 'X' (RSA) to the list of known hosts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard O'Sullivan updated CAMEL-8202: -------------------------------------- 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 as DEFAULT_KNOWN_HOSTS = "META-INF/.ssh/known_hosts". But this default 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: {code:xml} knownHostsFile={{user.home}}/.ssh/known_hosts {code:xml} FIX: Change the default to be the ".ssh/known_hosts" file in the user's home path. In 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} was: 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 as DEFAULT_KNOWN_HOSTS = "META-INF/.ssh/known_hosts". But this default 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"; } ``` > 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: Bug > Components: camel-jsch > Affects Versions: 2.13.2 > Environment: Linux, Tomcat, Camel > Reporter: Richard O'Sullivan > Priority: Minor > Labels: Logging, SSH > Original Estimate: 1h > Remaining Estimate: 1h > > 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 as DEFAULT_KNOWN_HOSTS = "META-INF/.ssh/known_hosts". > But this default 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: > {code:xml} > knownHostsFile={{user.home}}/.ssh/known_hosts > {code:xml} > FIX: Change the default to be the ".ssh/known_hosts" file in the user's home path. In 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)