SSH Securing Root Disable Root Log-ins

This is a guide on how to add more security to your server by disabling root logins and change the standard port that ssh uses.

First thing we need to do is create a a user name that we are going to use that will be our new root login.


[root@dev ~]# /usr/sbin/adduser admin
-OR-
[root@dev ~]# useradd admin

You do not have to use admin you can use whatever you would like e.g. joe, jeff john, carl, richard either way remember that Linux is case sensitive so if you use a capitals in your login name you will have to use capitals every time you login.
Continue reading →

Root Login Notifier Script

I recently decided to write a Root Login Notifier Script this script checks every user that logs in as root or switches user to root against your firewall’s allowed hosts if the IP address of the root user is not in the allowed hosts list it silent sends an email to the address specified in the script listing the the username they sudo from or logged in as, as well as their ip address, and the date/time.  If the root user is in the allowed hosts list of the firewall it will echo “Welcome Super User”.

Continue reading →