Answer the question
In order to leave comments, you need to log in
Are there SSH proxies for logging?
Task - for security reasons, it is required to log all user actions (execution of commands) in the ssh terminal, in order to be able to analyze the history (if necessary).
Perhaps there is some kind of software something like "SSH-proxy" that passes SSH traffic through itself and at the same time keeps a log at the level of using commands / "terminal-sheets"?
Usual scenario:
C SSH-proxy:
Or maybe . is it worth looking in some other direction to solve the current problem?
Thank you.
Answer the question
In order to leave comments, you need to log in
Try the snoopy (snoopy logger) ELF library . There are ready packages for most rpm/deb systems.
Logs all executable console commands, all run scripts, etc. You can get around it only by disabling the preload of the library (you actually need to have superuser rights).
The output in the logs is extremely detailed and informative. Example:
Aug 10 06:30:01 ctrx snoopy[15967]: [uid:0 sid:15967 tty: cwd:/root filename:/usr/bin/scp]: scp [email protected]***********:/home/www-data/downld02.txt /var/www/ctrx.com/collect/downld02.txt
Aug 10 06:30:01 ctrx snoopy[15968]: [uid:0 sid:15968 tty: cwd:/root filename:/srv/www/forum.ctrx.com/bin/collect-stats]: /srv/www/forum.ctrx.com/bin/collect-stats
Aug 10 06:30:01 ctrx snoopy[15966]: [uid:0 sid:15966 tty: cwd:/root filename:/srv/www/www.ctrx.com/bin/process-collect-data]: /srv/www/www.ctrx.com/bin/process-collect-data
Aug 10 06:30:01 ctrx snoopy[15969]: [uid:0 sid:15969 tty: cwd:/root filename:/usr/bin/sync-video]: /usr/bin/sync-video
Aug 10 06:30:01 ctrx snoopy[15971]: [uid:0 sid:15969 tty: cwd:/root filename:/usr/bin/basename]: basename /usr/bin/sync-video
Aug 10 06:30:01 ctrx snoopy[15973]: [uid:0 sid:15969 tty: cwd:/root filename:/usr/bin/flock]: flock -n 9
Aug 10 06:30:01 ctrx snoopy[15974]: [uid:0 sid:15969 tty: cwd:/root filename:/usr/bin/rsync]: rsync -a -L --log-file=/var/log/sync.log [email protected]**********:/srv/video /var/www/ctrx.com/alias.ctrx.com/docs/projects/ctrx.com/
Aug 10 06:30:02 ctrx CRON[15963]: pam_unix(cron:session): session closed for user root
Aug 10 06:30:02 ctrx snoopy[15977]: [uid:106 sid:44096 tty: cwd:/ filename:/bin/cat]: cat /proc/diskstats
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question