Why can't record command containing ssh into /var/log/ssh.log?
Code:
vim /etc/profile chmod 777 /var/log/ssh.log Login with a normal user ,to input `cat /var/log/ssh.log` ,why no record in /var/log/ssh.log? |
export PROMPT_COMMAND='history |grep ssh >> /var/log/ssh.log'
|
Quote:
To write to a file, just execute the command: Code:
history |grep ssh >> /var/log/ssh.log |
All times are GMT -5. The time now is 07:55 PM. |