LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-16-2010, 01:00 PM   #1
unix.fresher
LQ Newbie
 
Registered: Dec 2008
Distribution: redhat
Posts: 27

Rep: Reputation: 17
Question ssh monitoring tool


Is it possible to record all the activities(command execution) of an user, who is login my server using ssh? Basically I want a GUI base tool, who will give me a report about remote login users' activities with time stamp.
Please help me.
I am using RHEL5.3
 
Old 03-16-2010, 01:51 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
A gui for something as simplistic as that? really? just run "who" for a list of currently logged in users.
 
Old 03-16-2010, 02:08 PM   #3
frndrfoe
Member
 
Registered: Jan 2008
Distribution: RHEL, CentOS, Ubuntu
Posts: 379

Rep: Reputation: 38
Try audit
...not a gui
 
Old 03-16-2010, 02:09 PM   #4
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Rep: Reputation: 16
I'd run w to see who is on and what is that user doing. Red lined is the ssh user connect to a Centos 5.4:
[root@centos54 ~]$ w
15:04:09 up 12 days, 1:54, 2 users, load average: 0.04, 0.05, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 10.45.31.189 15:03 0.00s 0.03s 0.01s w
samuel pts/1 10.45.31.189 15:04 3.00s 0.02s 0.02s -bash
 
Old 03-16-2010, 02:17 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
remember that how a user a user is connected bears no relation to what they're doing on the system.
 
Old 03-16-2010, 06:41 PM   #6
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, Ubuntu, FreeBSD, OpenBSD, OS X
Posts: 782
Blog Entries: 8

Rep: Reputation: 158Reputation: 158
If they're logged in (verified by the 'w' or 'who' command), they logged into an existing user account. Check the .bash_history file of that particular user to see what commands were run. You may need to adjust the history buffer to capture a larger snapshot for those who have busy sessions.
 
Old 03-16-2010, 11:34 PM   #7
unix.fresher
LQ Newbie
 
Registered: Dec 2008
Distribution: redhat
Posts: 27

Original Poster
Rep: Reputation: 17
Thanks Friends.
 
Old 03-17-2010, 04:22 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
A user can reconfigure its shell behaviour to avoid logging by linking history to /dev/null (oldest trick in the book) or setting log file size or history size. If you need a solution that unprivileged users can't mess around with see 'rootsh'. Make 'rootsh' and syslog log to a separate protected syslog server if you need to tamper-proof it further.
 
Old 03-17-2010, 11:48 AM   #9
avtandil_k
Member
 
Registered: Feb 2010
Distribution: CentOS,openSUSE
Posts: 30

Rep: Reputation: 16
Also the whowatch will give you a more detailed info. It's not a gui but a tui.
Check if you can get it installed on RHEL.
It is apt-get install whowatch on Debian.

Definitely can use this on CentOS. I used whowatch-1.4-1.2.el5.rf.x86_64.rpm and installed with no issues.
Attached Thumbnails
Click image for larger version

Name:	whowatch.png
Views:	24
Size:	16.1 KB
ID:	3064  

Last edited by avtandil_k; 03-17-2010 at 08:56 PM. Reason: addition
 
  


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
Performance Monitoring Tool gidrow Linux - Software 3 03-05-2010 09:08 AM
Apache Monitoring Tool.. your_shadow03 Linux - Server 6 11-21-2009 08:07 AM
Monitoring tool akshay_johari Linux - Software 1 12-05-2008 03:50 PM
Network monitoring tool tikit Linux - Software 1 10-23-2008 02:29 AM
Network monitoring tool ! chuck77 Linux - General 2 01-15-2002 06:59 PM

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

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