How to "watch" an SSH user in real-time on CentOS?
What is the best way to "watch" an SSH user in real-time? (Assuming I am root.) I want to see exactly what they're typing, as they type it, and the resulting output.
(So "history" or watching ".bash_history" won't be suitable.)
I've found a few possible options:
What do you think? Is there anything better? ttysnoop seems a little complicated to install, and I'm not sure how to get screen to "see" another user's session.
I am using a standard cpanel server on CentOS.
Want to sell domain names? Sign up today for an eNom.com reseller account from a trusted eNom ETP provider. * We provide support and service to over 3245 happy eNom domain name and SSL certificate resellers!
To watch their session using "screen -x" they need to be working within a screen session so they will know that you are watching the session too. This is usually being used for remote maintenance/remote assistance or for education purposes.
Option A: You can just try watching or tailing the virtual console and try to change the number vcsa1, vcsa2 etc:
You can install screen with "yum install screen" command. You can list the existing screens with screen -ls command. You can attach a screen with command screen -r [screen name]. If its already attached at the other end, you will have to use screen -x. At any time to exit from the screen, press (ctl+A) + D.