SSH
登录成功
$ grep 'Accepted' /var/log/secure | awk '{print $11}' | sort | uniq -c | sort -nr
# 或者
$ last # 读取 /var/log/wtmp 文件登录失败
$ grep 'Failed' /var/log/secure | awk '{print $11}' | sort | uniq -c | sort -nr
# 或者
$ lastb # 读取 /var/log/btmp 文件检查后门
对比ssh版本
$ ssh -V查看配置文件和/usr/sbin/sshd时间
$ stat /usr/sbin/sshd查看信息
监控sshd进程读写文件操作
Last updated
Was this helpful?