Monitoring and alerting for logins and login attempts
If you've ever participated or plan to participate in a red team versus red team operation, then the following information might be quite useful in case your machine gets popped (either by another red team or a real adversary).
If you have SSH (or other remote access endpoints) enabled on hosts, there are some ways to explore and add mitigations in case your keys or password are compromised, or someone leverages an unknown or unpatched vulnerability to login. These are some basic ideas to explore that may trigger some more ideas on your side.
Receiving notifications for logins on Linux by leveraging PAM
Pluggable Authentication Modules (PAMs) are used on Linux and macOS to configure and change login behavior. It is a possible place to add additional logging.
As an example, if, for some reason, you have endpoints such as SSH exposed, PAM can help with additional alerting. You can add additional logging and notifications...