LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-19-2006, 01:48 PM   #1
Verbal Kint
Member
 
Registered: Apr 2004
Posts: 99

Rep: Reputation: 15
SSH Access Attempts


Hello,

I was wondering if someone can plesae tell me the shell command to see failed/successful ssh access attempts to my Fedora machine.

Thanks
 
Old 09-19-2006, 02:07 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ssh logins normally end up in /var/log/secure
 
Old 09-19-2006, 02:40 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by acid_kewpie
ssh logins normally end up in /var/log/secure
Actually, in most systems by default it's in /var/log/messages, /var/log/secure is for sudo commands/access.
 
Old 09-19-2006, 02:50 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Default on my Debian boxes is /var/log/auth.log
 
Old 09-19-2006, 02:53 PM   #5
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Ubuntu boxes are set to /var/log/auth.log as well.

You could do something like:
{CODE]grep FAILED -i /var/log/*[/CODE]
 
Old 09-19-2006, 02:53 PM   #6
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
Also you can install logwatch to send daily summary reports by mail of potential problems found in the log files.
 
Old 09-19-2006, 02:54 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by trickykid
Actually, in most systems by default it's in /var/log/messages, /var/log/secure is for sudo commands/access.
i think not. cowboy.
 
Old 09-19-2006, 03:08 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by acid_kewpie
i think not. cowboy.
Ok so Debian is screwed up and likes to be unormal.. Redhat systems and it's derivatives use /var/log/messages as do Slackware, and that is really all that matters..
 
Old 09-19-2006, 03:39 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
are you suggesting i'm one of those smug greasy debian types? good grief. all redhat boxes i touch contain verbose ssh logging in the secure file, more useful than the noise in messages.
 
Old 09-20-2006, 01:24 AM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Logging ssh to /var/log/messages does seem a bit silly, as just about everything else logs there... I would've thought something as significant as SSH would go somewhere more noticable (who actually looks in messages unless something is broken?)
 
Old 09-20-2006, 04:49 AM   #11
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
I was just trying to point out that by default on Redhat and on most systems, it logs to messages instead of secure, especially since he mentioned he was using Fedora. /var/log/secure is for security type errors with sudo, etc. I wouldn't think a simple login from a user counts as a security measure, since it can happen on some systems so very often. I'd rather be concerned with sudo abuse and other security concerns in a separate log of their own, not in the "noisy" messages log..

But damn, log wherever you want.. no need to get all defensive about it..

Last edited by trickykid; 09-20-2006 at 05:25 AM.
 
Old 09-20-2006, 09:19 AM   #12
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Wasn't trying to get defensive at all. I've just seen too many systems with TONS of messages in messages, to the point where nobody could find anything at all. I understand that each distro has its own way of handling things, and logging successful logins to secure wouldn't make much sense either, I agree.
 
Old 09-20-2006, 09:53 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by Matir
Wasn't trying to get defensive at all. I've just seen too many systems with TONS of messages in messages, to the point where nobody could find anything at all. I understand that each distro has its own way of handling things, and logging successful logins to secure wouldn't make much sense either, I agree.
you sound all appologetic. just call him a hick and he'll leave you alone
 
Old 09-20-2006, 04:08 PM   #14
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by acid_kewpie
you sound all appologetic. just call him a hick and he'll leave you alone
Oh you're just mad cause I made sense..
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH login attempts Capt_Caveman Linux - Security 225 11-07-2009 09:55 AM
ssh brute force attempts coolb Linux - Security 4 06-04-2006 04:53 AM
Failed SSH login attempts Capt_Caveman Linux - Security 38 01-03-2006 03:22 PM
stop ssh attempts with limitssh teddymills Linux - Security 2 12-14-2005 07:24 PM
numerous ssh attempts archdev Linux - Security 14 08-10-2004 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:33 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
Open Source Consulting | Domain Registration