sorry for the late reply..
If you are not familiar with IPtables then you can do it through your WHM.
Click on Security > the Security Center > Host Access Control (block IP access) >
there you will have a new page with daemon access controls.
Add the IP's you want to add like this....i have take a screenshot as an example for you..then at the very end of the allow list for sshd you need the deny.
the ip address is just an example, add any ip address you want to allow ssh access above the deny.
Hope this helps.. if you need any more help just let me know
You shouldnt really ever login over ssh as root, you should really su once you are in.
.... here is a quick step by step...
this should work on move linux distros...
Step 1 -
Code:
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old
this will make a copy of the file your going to edit just in case
Ok so now edit the file, in Vi, Nano, Pico which ever you want
Step 2 - look for Protocol 2,1 change this to
Step 3 - look for the line that should look like
# PermitRootLogin yes
change that to
dont forget to remove the #
======================================
then you need to create a user that is allowed to use the SU command so first it might be an idea to create a user for arguments sake ill call the user Bob.
Code:
usermod -G wheel Bob
this add bob to the wheel group, which is allow to use the SU command to prevent any other users from using the SU command do the following.
Open
in a editor i prefer vi and remove the hash (#) from this line
Code:
auth required /lib/security/pam_wheel.so use_uid
=========================================================
Now you can do this 2nd section first it is up to you. But make sure once you have done it make sure it works... don't close the session you already have open. open a new session and try it
You shouldnt need to restart the sshd daemon for this to work, This is my way of doing it im sure someone will come up with another way that they do it as usual for these types of forum.. my way may not be the best way but it works
