LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 07: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, 08:01 AM   #2
satya123
Member
 
Registered: Mar 2011
Posts: 31

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


Reply



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 10:05 AM
[SOLVED] Logging SSH in a separate file other than the regular /var/log/messages satya123 Linux - Newbie 7 04-13-2011 07:43 AM
Logging syslog messages from a particular IP to individual file simplified Linux - Server 7 03-12-2009 02:03 PM
Logging - Text File to Syslog humbletech99 Linux - Security 3 01-29-2008 06:47 AM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:33 AM.

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
Open Source Consulting | Domain Registration