Enabling Logging for SSH2 Library
If the SSH2 connection fails with no useful information in the PPM logs, you can route the logs of the JSch library to a dedicated file and set its logging level to a more verbose setting by adding the following text in your logging.conf
file. You can change the red parts as you demand.
# SSH2/JSch logging.
log4j.logger.com.kintana.core.net.ssh2.jsch=DEBUG, JSCH_LOG
# JSCH_LOG has a dedicated log file to easily pinpoint any error during SSH2 connection. log4j.appender.JSCH_LOG=org.apache.log4j.RollingFileAppender log4j.appender.JSCH_LOG.File=${jboss.server.home.dir}/log/ssh2_jsch_log.txt log4j.appender.JSCH_LOG.Append=true log4j.appender.JSCH_LOG.MaxFileSize=250KB log4j.appender.JSCH_LOG.MaxBackupIndex=20 log4j.appender.JSCH_LOG.layout=org.apache.log4j.PatternLayout log4j.appender.JSCH_LOG.layout.ConversionPattern=%x:%t:%c:%d{yyyy/MM/dd-HH:mm:ss.SSS z}: %m%n
Note: Make sure that the value of the parameter com.kintana.core.logging.SYSTEM_THRESHOLD
in the logging.conf
file is set according to the logging level chosen for JSch logs.