when someone abandons you,it is him that gets loss because he lost someone who truly loves him but you just lost one who doesn’t love you.
牵一发而动全身,在查 ssh 为啥无法公私钥认证登陆的图中,找到了开启 sshd_config DEBUG 模式,将认证过程的 log 记录在 auth.log 中
为了方便,我直接删除了 auth.log,想着它应该是会被重新生成的,结果意料之中的意料之外,它没有自己生成
那我就想着自己创建一个总行了吧,结果还是没有收集到任何的 debug 信息
Ubuntu Document 中的一段话
The Authorization Log tracks usage of authorization systems, the mechanisms for authorizing users which prompt for user passwords, such as the Pluggable Authentication Module (PAM) system, the sudo command, remote logins to sshd and so on. The Authorization Log file may be accessed at /var/log/auth.log. This log is useful for learning about user logins and usage of the sudo command.
从上面这段引用可以了解到,ubuntu 通过 /var/log/auth.log 文件可以查看一些关于 ssh 登陆、sudo 命令的信息
1 | $ ps auxf | grep syslog # 确认 rsyslog 进程是否正常运行 |
上面的结果告诉我,这货不要太正常
1 | $ vim /etc/rsyslog.d/50-default.conf # 排查 rsyslog 的配置是否正确 |
看得出来,谁都没动过
1 | # 手动创建 auth.log |
此外,我还重启了一下 syslog 服务,终于正常的见到了 auth.log 的内容
1 | $ ls -l /var/ | grep log # 人家的教程里还有一步这个检查,我也执行了,下述结果是正确的 |
还有一个结论,rsyslog 是正常工作的,但是没有创建 /var/log/auth.log
be slow to promise and quick to perform.