UnixPedia : HPUX / LINUX / SOLARIS: HPUX : how to redirect the sshd logging in a File

Saturday, June 15, 2013

HPUX : how to redirect the sshd logging in a File

Changes which need to be done in sshd.config


# HostKeys for protocol version 2
#HostKey /opt/ssh/etc/ssh_host_rsa_key
#HostKey /opt/ssh/etc/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility local7
LogLevel debug3




Changes which need to be done in syslogd.conf :



#-> vi /etc/syslog.conf
"/etc/syslog.conf" [Read only] 14 lines, 362 characters
# @(#)B11.23_LR
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug                      /var/adm/syslog/mail.log
local1.info                     @janapux1
local7.debug                    /var/adm/syslog/sshd.log             #(please do not use space bar use tab)
*.info;mail.none;local1.none;local7.none        /var/adm/syslog/syslog.log
*.alert                         /dev/console
*.alert                         root
*.emerg                         *
*.info  @10.153.53.39


---------------
#->  touch  /var/adm/syslog/sshd.log

restart the sshd and syslogd deamon from console.


#-> /sbin/init.d/secsh stop;/sbin/init.d/secsh start
#-> /sbin/init.d/syslogd stop ;/sbin/init.d/syslogd start





No comments:

Post a Comment