# sshd configuration

**URL:** https://forums.suse.com/t/sshd-configuration/27370
**Category:** SLES Configure-Administer
**Created:** [August 26, 2015, 9:03am UTC](https://forums.suse.com/t/sshd-configuration/27370 "2015-08-26T09:03:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Pankaj](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@Pankaj](https://forums.suse.com/u/Pankaj)
#### Post date: [August 26, 2015, 9:03am UTC](https://forums.suse.com/t/sshd-configuration/27370/1 "2015-08-26T09:03:36Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Pankaj](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@Pankaj](https://forums.suse.com/u/Pankaj)
#### Post date: [August 26, 2015, 11:49am UTC](https://forums.suse.com/t/sshd-configuration/27370/2 "2015-08-26T11:49:39Z")

</div>

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;  
& ~

---

<div class="post-metadata">

### Author: ![maikcat](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@maikcat](https://forums.suse.com/u/maikcat)
#### Post date: [August 26, 2015, 1:18pm UTC](https://forums.suse.com/t/sshd-configuration/27370/3 "2015-08-26T13:18:33Z")

</div>

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

Michael.

---

<div class="post-metadata">

### Author: ![smflood](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/smflood/32/10576_2.png) [@smflood](https://forums.suse.com/u/smflood)
#### Post date: [August 26, 2015, 4:12pm UTC](https://forums.suse.com/t/sshd-configuration/27370/4 "2015-08-26T16:12:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![maikcat](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@maikcat](https://forums.suse.com/u/maikcat)
#### Post date: [August 27, 2015, 11:27am UTC](https://forums.suse.com/t/sshd-configuration/27370/5 "2015-08-27T11:27:37Z")

</div>

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

my bad sorry

Michael.
