1. 使用命令 last 查看登录历史记录:
last username

其中 username 是你要查看的账户名。

  1. 使用命令 lastb 查看登录失败的历史记录:
lastb
  1. 查看系统日志文件 /var/log/auth.log,可以使用命令 tail 查看最近的登录记录:
tail /var/log/auth.log
  1. 可以使用 grep 命令筛选某个用户的登录记录:
grep "username" /var/log/auth.log

其中 username 是你要查看的账户名。

  1. 如果你的系统使用了 auditd,可以使用命令 ausearch 查看特定用户的操作记录:
ausearch -ua username

其中 username 是你要查看的账户名。

Linux ssh 查看账户操作记录和日志

原文地址: https://www.cveoy.top/t/topic/hrwo 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录