sshd configuration

Hi all,

I am using sles11 sp1. I want to configure sshd to log messages in different file other than /var/log/messages.
how can I achive this?

Hi All,

It’s done using filter in /etc/rsyslog.conf file as

Redirect sshd related messages

if ($programname == ‘sshd’ or $msg contains ‘publickey’) then \
#if ($msg contains ‘publickey’) then \
-/var/log/sshd/sshd.log;
& ~

which syslog do you use? rsyslog or syslog-ng?

Michael.

On 26/08/2015 11:24, maikcat wrote:
[color=blue]

which syslog do you use? rsyslog or syslog-ng?[/color]

Given jaipankaj reported back that they edited /etc/rsyslog.conf I’m
guessing they’re using rsyslog. For syslog-ng on SLES11 SPx the file to
edit is /etc/syslog-ng/syslog-ng.conf which has a different format.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

didnt notice that the op simply updated the thread with a solution,

my bad sorry

Michael.