This is an email alert that is triggered once a SSH login succeeds First we will create the script itself in the ssh folder /etc/ssh/login-notify.sh: Make the file executable, then add the following line to the end of the sshd pam file in /etc/pam.d/sshd It’s set to optional for testing, as it would prevent login…
Tag: linux
A script to secure the server using IPtables firewall
Use this bash script to automate the configuration of the iptables firewall and persist rules over restarts.
How to secure the SSH Server on Ubuntu
This is a short overview of how to secure the SSH server on a fresh Linux system. We will cover the basics of setting up a robust SSH configuration to access and manage the remote machine later on. Secure the SSH Daemon Configuration File All the configuration of the SSH server we need to adjust…