登录一台Ubuntu Linux系统,会提示上一次的登录信息:
Last login: Wed Jan 24 09:49:29 2018 from 25.68.xx.xx
因为不想让人知道我登录过,所以要禁掉这些信息:
vi /etc/ssh/sshd_config 修改PrintLastLog yes 为: PrintLastLog no
[email protected]:~# service ssh restart
[email protected]:~# cat /dev/null > /var/log/wtmp
[email protected]:~# cat /dev/null > /root/.bash_history
[email protected]:~# cat /dev/null > /root/.bashrc
[email protected]:~# cat /dev/null > /root/.mysql_history
[email protected]:~# history -c