Simple method your to notify by e-mail whenever there is SSH access to your server by adding several lines into .bashrc file.

0. Requirement

You will need mailer which works public internet environment.

For Debian/Ubuntu, you can install simply by command,

sudo apt install mailutils

1. Open your .bashrc file

nano ~/.bashrc
sudo nano /etc/profile

2. Edit and add script

IP="$(echo $SSH_CONNECTION | cut -d " " -f 1)"
HOSTNAME=$(hostname)
NOW=$(date +"%e %b %Y, %a %r")
echo 'Someone from '$IP' logged into '$HOSTNAME' on '$NOW'.' | mail -s 'SSH Login Notification' <mail address>

Just modify <mail address> as yours.

Copy & paste into ~/.bashrc or /etc/profile.

Save & Exit.

3. Test SSH login

If you access server, you will recieve notification e-mail to configured address like below: