From b43234a40f57c06af3d30b0f91ca747526baf979 Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Fri, 10 Nov 2023 20:29:40 +0100 Subject: [PATCH] Site update --- content/blog/hardening-level-pro-notify-on-ssh-login.md | 2 +- .../hardening-level-pro-notify-on-ssh-login/index.html | 8 ++------ public/blog/index.xml | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-) 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 @@ Hardening Level Pro: Notify on SSH Login - + @@ -48,7 +46,6 @@ The most important way of managing your linux vps or in general any machine for

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.sh

Also 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.