Securing SSHD

Just do something similar to
Code:
cd /usr/local/directadmin/data/templates/
cp edit_files.txt custom/
cd custom
echo "/etc/hosts.deny=user=root&group=root&permission=644
/etc/hosts.allow=user=root&group=root&permission=644" >> edit_files.txt
Then go to the admin area of directadmin and check the file editor to make sure they are in, readable and input a letter and save to make sure its able to write ok. You can do this with any file on the system, just make sure to check its owner/group/permission and put it in the line before adding it.
 
Thanks, I'm not a complete linux noob. I've been working with linux for like 6 years or so.

Just am used to the older sshd variant where it allows you to use AllowHosts, I already added them now. Thanks!

Edit:
Tested and it works, thanks!
 
Last edited:
Back
Top