Code:
vim /etc/profile
export HISTTIMEFORMAT="%Y-%m-%d:%H-%M-%S: `whoami` : "
export PROMPT_COMMAND='history -a |grep ssh >> /var/log/ssh.log'
sudo touch /var/log/ssh.log
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?