without using any built-in commands like history because if history is cleared all commands will be gone,but in my log file it must be present every time. As per my understanding, 1.A daemon should start running in background when user login through ssh, it redirects all commands to a log file. 2.Log file should have max of 500 commands(done through logrotate.conf)
Whether I have to to code change in sshd daemon? or how to do this?
Define "user command". There are lines of input, but you can't tell if they are commands (read by the top-level shell) or inputs to applications, and this latter case would include commands in a second-level shell. Then you don't know what happens in screen-based editors (nano
, vi
) and you don't know what scripts do.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments