LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-14-2006, 06:36 AM   #1
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Rep: Reputation: 15
Monitoring ssh connections in slackware..


Im a windows convert , been on slackware for a month now and i never looked back ..Few days ago i managed to get my ssh running so i can connect to my pc remotely. Question is how do i monitor my ssh connections when im at home ? Is the program already included in slackware or is it a seperate download and if so what is it called ?

I did not post this in the newbie forum because i realised that diff distros have diff packages and programs to do certain things (/me remembers the 1 hour he spent following an rpm tutorial) .
Thanx for your time , any help would be greatly appreciated..

ps: win xp cd makes a great coaster..
 
Old 05-14-2006, 10:33 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
The command
Code:
 grep -e ' sshd\[\w*\]: ' /var/log/messages
will show you what connection attempts the ssh daemon accepted or denied.
A program like logwatch can distill this information from the messages log on a daily basis for you and send these results as an email.

Eric
 
Old 05-14-2006, 12:08 PM   #3
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Original Poster
Rep: Reputation: 15
ahh it works, thanx bob really appreciate it.. is there anyway i can monitor it in real time ? Like a connection monitor running so i can see how many and who are the users that are connected at any given time? Once again thanx
 
Old 05-14-2006, 12:36 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Well....
Code:
who
will show everyone who's currently logged in and
Code:
last -25
will give you a list of the last 25 logins (that includes local terminal logins as well as remote ssh logins).

Eric
 
Old 05-14-2006, 12:41 PM   #5
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Original Poster
Rep: Reputation: 15
Thanx again bob , yer a life saviour
 
Old 05-15-2006, 02:34 AM   #6
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Provided the wiki doesn't explode (it's been feeling poorly of late) you might want to peruse a page I wrote about blocking ssh brute force attacks with iptables. Unless you intend to use tcp_wrappers to deny access to your sshd from all but a few, trusted locations (like you should) then you're going to see about 100-300 connections a day coming from sites all over the place doing lame dictionary attacks. The techniques outlined on that page will stop those attacks on the second connection.

Note that before you upgrade to iptables 1.3.5 you'll want to take a look at your kernel config (if you're not using the default Slackware kernel) and make sure you've actually got netfilter support enabled, and it wouldn't hurt to just turn on everything under there as modules.
 
Old 05-15-2006, 06:55 AM   #7
Ryuji Yamazaki
Member
 
Registered: Oct 2004
Location: Singapore
Distribution: Slackware, FreeBsd
Posts: 43

Original Poster
Rep: Reputation: 15
Page wont display hmm.. ill try later.. anyways thanx for the suggestion evil.
 
Old 05-15-2006, 10:03 AM   #8
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
Also, if your running Gkrellm you can go to the Internet setup and specify what port you want gkrellm to keep and eye one. Gkrellm shows when someone logs into that port, how many connections, etc.. Neat little tool. I have mine set up to show SSH (22) and FTP (21).
 
  


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
ssh login monitoring Yomaoni Linux - Security 2 09-08-2005 10:10 AM
SSH Session Monitoring? totalrockage Linux - Networking 1 04-08-2005 01:01 AM
SSH Failed Password Monitoring KPOM Linux - Security 1 10-09-2004 11:25 PM
SSH doesn't accept connections basse- Linux - Software 1 05-23-2004 07:33 AM
Can I see ssh connections? bruno buys Linux - Networking 4 11-19-2003 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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