Receive an email alert for each ssh login. The script can be extended to support other notification methods such as Slack, etc.
mkdir -p /etc/pam.scripts
chmod 0755 /etc/pam.scripts
vim /etc/pam.scripts/ssh_alert.sh
add the following script to ssh_alert.sh
, modifying the variables from their default value
#!/bin/bash