Logging, Syslog and Log Anaylsys Forums
July 30, 2010, 09:39:44 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
WIKI
BLOG
Help
Search
Recent Topics
GoogleTagged
Login
Register
Logging, Syslog and Log Anaylsys Forums
>
Forums
>
syslog-ng
>
Logging ssh access attempts
Pages: [
1
]
« previous
next »
Print
Author
Topic: Logging ssh access attempts (Read 410 times)
Kreno
Newbie
Offline
Posts: 6
Logging ssh access attempts
«
on:
February 19, 2010, 09:10:22 am »
Hello all,
I would like to log ssh log-in attempts to Cisco router, Cisco ASA and two Opensolaris computers into separate file. Does anybody have example on how to achieve it? Current syslog-ng is configured that all data is stored in one file.
Thank you and kind regards,
M
Logged
Admin
Administrator
Newbie
Offline
Posts: 146
Re: Logging ssh access attempts
«
Reply #1 on:
February 19, 2010, 10:25:16 am »
Code:
source s_net { udp(); };
destination d_hosts {
file("/var/log/$HOST.log";
};
log { source(s_net); destination(d_hosts); };
That will put the messages from each host into a separate file.
Logged
Kreno
Newbie
Offline
Posts: 6
Re: Logging ssh access attempts
«
Reply #2 on:
February 21, 2010, 05:30:43 am »
I have all host is separate log files. What I would like to achieve is that only ssh attempts would be logged into for example ssh-log.log file.
Logged
Admin
Administrator
Newbie
Offline
Posts: 146
Re: Logging ssh access attempts
«
Reply #3 on:
February 21, 2010, 01:53:52 pm »
try this:
Code:
source s_net { udp(); };
filter f_ssh { match("ssh"); };
destination d_hosts { file("/var/log/$HOST.log"; };
log { source(s_net); filter(f_ssh); destination(d_hosts); };
This will only log events that contain the string "ssh" to the files. You may need to adjust the filter based on what events you want to see.
Logged
Pages: [
1
]
Print
GoogleTagged:
opensolaris
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Forums
-----------------------------
=> Syslog & syslogd
=> syslog-ng
=> Log Data and Analysis
=> Windows Event Log
=> Web Server Logs
=> Security Event Management
=> General Discussion
===> Red Light District
Loading...