ttylog is a Perl utility intended for attaching to currently running tty sessions for the purposes of administration, shell assisting, bandwidth tracking, and logging for debugging or training. Unlike other tty sniffers, this utility does not require any patches to the kernel or any system configuration modifications or tweaking. You can even install it AFTER someone has logged in and connect on the fly to instantly view their session which has already been currently running for a long time.
SYNOPSIS
ttylog tty
or
ttylog -t tty [ -w file ]
or
ttylog -r file [ -b file ] [ -i file ] [ -o file ]
EXAMPLE
Type "w" to obtain the desired tty:
[root@host root]# w
9:01am up 81 days, 16:06, 5 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 admin.com 8:19am 0.00s 0.39s 0.05s w
joe pts/1 workstation.wi 8:02am 39:33 2.63s 2.19s pine
hacker pts/4 client.isp.com 8:45am 5.00s 27.95s 1.45s vim devil.cfg
[root@host root]#
Then connect to monitor what is being typed or what is seen through the tty:
[root@host root]# ttylog pts/4
Product's homepage
Requirements:
· Perl