вторник, 28 июля 2020 г.

ssh logining log

1) vim  /etc/bash.bashrc
Append to the end of that file:

export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local6.debug "$(whoami) [$$]: $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" ) [$RETRN_VAL]"'

2) Set up logging for "local6" with a new file:
vim  /etc/rsyslog.d/bash.conf
And the contents...
local6.*    /var/log/commands.log

3) Restart rsyslog:
sudo service rsyslog restart

1 комментарий:

  1. Online Casino Site - Lucky Club
    Enjoy 카지노사이트luckclub the thrill of winning real money with a welcome bonus! Online Casino No Deposit Bonuses. Get Free Spins & No Deposit Bonuses. Play Now. Welcome to Lucky

    ОтветитьУдалить