LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-18-2015, 09:44 AM   #1
shaggyman
LQ Newbie
 
Registered: Oct 2007
Location: south Florida
Posts: 5

Rep: Reputation: 0
Question Show failed ssh connections on systemd


Journalctl only shows accepted ssh connections. How do I find out the rejected connections?

I'm using openSUSE 13.2
 
Old 07-18-2015, 10:35 AM   #2
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by shaggyman View Post
Journalctl only shows accepted ssh connections. How do I find out the rejected connections?

I'm using openSUSE 13.2
Hmm, isn't that information still in:
Code:
/var/log/auth.log
Best regards,
HMW

Edit:
At least in Debian based distros. Sorry, I don't really know about openSUSE.

Last edited by HMW; 07-18-2015 at 10:36 AM.
 
Old 07-19-2015, 03:27 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by shaggyman View Post
Journalctl only shows accepted ssh connections.
If not 'journalctl -u sshd.service' or 'journalctl /usr/sbin/sshd' what's the exact command line you have used to search for those? And did you make certain you haven't done any journal / syslog config, ops or maintenance that filtered out certain messages, pruned logs or put them in non-standard places? And in addition to what HMW wrote: you run the audit service on openSUSE then you could try something crude like 'ausearch -sv no -ts this-month -x "/usr/sbin/sshd";'?
 
Old 07-21-2015, 08:57 AM   #4
shaggyman
LQ Newbie
 
Registered: Oct 2007
Location: south Florida
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks unSpawn, ausearch did the trick.

I was using `journalctl -u sshd.service --since $jrnlStart`
where $jrnlStart was set to UnixDate("3 days ago","Y-%m-%d")

I used to use /var/log/auth.log, but it went away when journalctl came on the scene.

By filtering `ausearch -ts $jrnlStart -x "/usr/sbin/sshd"` I can get a log of who logged on and who tried to log on by IP address and user ID.

I have a little perl program that runs every night to check the state of the hardware and do various backups. This was an additional security check. The results are emailed to me so I can find out if I need to do something the next morning.

Another thing I was getting from auth.log was a list of su to root.
 
Old 07-21-2015, 05:46 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Glad to see it works & thanks for confirming.
 
  


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
systemd[1]: Failed to start Load Kernel Modules. LateForLunch Linux - Software 1 07-06-2015 05:00 PM
[SOLVED] Failed systemd install ruined my boot, trying to restore sysvinit the dsc Debian 2 11-20-2012 10:00 PM
[SOLVED] IPTABLES - show tcp connections kongfranon Linux - Security 4 06-29-2011 05:21 PM
ssh logs show numerous failed attempts schneidz Linux - Security 12 06-22-2009 01:30 PM
wireless connections won't show up greyfoxsylux Linux - Wireless Networking 5 04-06-2008 02:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:30 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