title = 'Hardening Level Pro: Notify on SSH Login'
date = 2023-11-10T19:27:27+01:00
draft = false
+++
You ever anxious about somebody possibly gaining access to your machine? Fret not, you can just make it so that on any kind of login to your system directly you can get a notification on your phone.
For this you will need a way to receive the messaggess. I personally use a selfhosted [ntfy.sh](https://ntfy.sh/) server.
The most important way of managing your linux vps or in general any machine for most of us is ssh. So why not just get a notification whenever somebody logins!? Even you!
To achieve this you will need to make a shell script and use a pam module, yes you will need to enable UsePAM in your sshd config, but don't worry it's secure.