diff --git a/content/blog/hardening-level-pro-notify-on-ssh-login.md b/content/blog/hardening-level-pro-notify-on-ssh-login.md index c51125f..7772781 100644 --- a/content/blog/hardening-level-pro-notify-on-ssh-login.md +++ b/content/blog/hardening-level-pro-notify-on-ssh-login.md @@ -6,7 +6,7 @@ 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. diff --git a/public/blog/hardening-level-pro-notify-on-ssh-login/index.html b/public/blog/hardening-level-pro-notify-on-ssh-login/index.html index 1aecb47..6f95242 100644 --- a/public/blog/hardening-level-pro-notify-on-ssh-login/index.html +++ b/public/blog/hardening-level-pro-notify-on-ssh-login/index.html @@ -8,9 +8,7 @@
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 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.
@@ -70,8 +67,7 @@ The most important way of managing your linux vps or in general any machine for session optional pam_exec.so /usr/bin/ntfy-ssh-login.shAlso make sure that pam is realoaded using this command pam-auth-update --force --package
.
You can modify the script to do email or anythingg else, but I preffer ntfy since the notification are instant.
-Hope this was of help and let’s see you in another post.
- +Hope this was of help and let’s see you in another post.