Scribble at 2023-10-07 09:25:33 Last modified: unmodified
The rsyslog service maintains various log files in the /var/log directory. Amazon Linux 2 keeps this service for backward compatibility. By default, the rsyslog service isn't installed in Amazon Linux 2023. So, the corresponding files in the /var/log directory, such as /var/log/messages, are also not available in Amazon Linux 2023.
ということで、/var/log に messages も maillog もないのは、Amason Linux 2023 に rsyslog がそもそも入っていないからだ。入れたらログは取れるし、そのままでも # journalctl -u sshd とやれば sshd のログは表示できる。/var/log/journal にログがある。ただし、"86f14de05eb048f2914a941511663228" のようなディレクトリに格納されているため、ファイルとして直にアクセスして個々に読むのは現実的ではない。journalctl コマンドを使うのが妥当だろう。