Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
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.
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.
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.
Last edited by avtandil_k; 03-17-2010 at 08:56 PM.
Reason: addition
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.