質問

is there a way to log the commands that every user typed in their ssh session automatically and put it to a log file?

I´m using ubuntu server 12.04.

greetings White

役に立ちましたか?

解決

You can use "scripts" command for same , basically you have add command "script -a " to the profile file for each user you have on your system (profile file /home/user/.bash_profile) .

Please be informed that script will also dump the command output to the file as well, and user need to do exit twice to close the session.

"man script" for more information.

Regards, Jain

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top