PDA

View Full Version : sshd configuration



jaipankaj
26-Aug-2015, 07:03
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?

jaipankaj
26-Aug-2015, 09:49
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;
& ~

maikcat
26-Aug-2015, 11:18
which syslog do you use? rsyslog or syslog-ng?

Michael.

smflood
26-Aug-2015, 14:12
On 26/08/2015 11:24, maikcat wrote:

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

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.
------------------------------------------------------------------------

maikcat
27-Aug-2015, 09:27
didnt notice that the op simply updated the thread with a solution,

my bad sorry

Michael.