LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-02-2011, 08:47 AM   #1
satya123
Member
 
Registered: Mar 2011
Posts: 31

Rep: Reputation: 0
Logging ssh messages in a separate file using syslog-ng


Hi all,
I am facing a problem while trying to log SSH messages in a separate file, say, /var/log/ssh_logs. I have tried modifying the syslog-ng.conf file as follows:

filter f_ssh { facility(auth, authpriv) and match("sshd\[[0-9]+\]:"); };

destination d_ssh { file ("/var/logs/sshd_logs"); };

log {
source(s_local);
source(s_external);
filter(f_ssh);
destination(d_ssh);
};

But still I am not able to get the ssh logs in the new file. They continue to go to /var/log/auth.

Hope somebody can help me out as it is a not urgent.
Thanks in advance.
 
Old 07-02-2011, 09:01 AM   #2
satya123
Member
 
Registered: Mar 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Sorry...
Gave a wrong destination file..
SOlved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
syslog not updating the messages file bhageshp Linux - Server 8 07-06-2014 11:05 AM
[SOLVED] Logging SSH in a separate file other than the regular /var/log/messages satya123 Linux - Newbie 7 04-13-2011 08:43 AM
Logging syslog messages from a particular IP to individual file simplified Linux - Server 7 03-12-2009 03:03 PM
Logging - Text File to Syslog humbletech99 Linux - Security 3 01-29-2008 07:47 AM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 04:35 AM


All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration