LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-31-2011, 05:33 PM   #1
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
how to log ssh activity in /var/log/ssh/ssh*.log


Hi group,

I need to log ssh access in /var/log/ssh/*.log. I know I need to modify /etc/ssh/sshd_config but have not been able to find the magic syntax.

Amy pointers?

Thanks for your time.
 
Old 10-31-2011, 06:13 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by MrUmunhum View Post
I need to log ssh access in /var/log/ssh/*.log. I know I need to modify /etc/ssh/sshd_config but have not been able to find the magic syntax.
Dunno what the asterisk stands for but try 'man sshd_config': SyslogFacility (chose one of LOCAL), 'man syslog.conf': EXAMPLES (as in say "local0.* /var/log/ssh.log").
 
Old 11-01-2011, 12:56 PM   #3
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by unSpawn View Post
Dunno what the asterisk stands for but try 'man sshd_config': SyslogFacility (chose one of LOCAL), 'man syslog.conf': EXAMPLES (as in say "local0.* /var/log/ssh.log").
Tried this:
# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility LOCAL0
#SyslogFacility AUTHPRIV
LogLevel INFO

local0.* /var/log/ssh.log
. . .

And got this:
service sshd restart
Stopping sshd: [ OK ]
Starting sshd: /etc/ssh/sshd_config: line 37: Bad configuration option: local0.*
/etc/ssh/sshd_config: terminating, 1 bad configuration options
[FAILED]

Could not find example in man sshd_config.
 
Old 11-02-2011, 03:25 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by MrUmunhum View Post
Starting sshd: /etc/ssh/sshd_config: line 37: Bad configuration option: local0.*
(..)
Could not find example in man sshd_config.
I gave you two manual pages to read. The "local0.* /var/log/ssh.log" line is in /etc/syslog.conf.
 
  


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
[SOLVED] how to log in with ssh without having someone log into the machine mandu Linux - Newbie 2 07-12-2011 10:49 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
no ssh logging in /var/log/secure mberd Linux - Security 4 05-27-2009 08:55 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 05:13 PM
Log all SSH commands at ssh-client. mohammednv Linux - Networking 6 01-26-2008 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration