Let's talk about it first. Many websites, blogs, and technical articles are also pseudo-original, so they are harmless. All TMD is copy, copy, and copy. Just copy it and forget it. You TMD also changed the content... Changed to incorrect. Then many websites will be reposted and the error will be taken to the end ....... Small editor! I have never practiced writing a JB tutorial ....
Spit out!
Install denyhosts in the centos system to prevent brute force SSH cracking.
If the installation tutorial is published online, you will not post the address. The installation is basically normal.
Just look at the configuration in denyhosts. cfg. By default, purge_deny = is set to null and is permanently disabled. If necessary, you must change it first...
PS: Check each item carefully. What this online says is true.
Note: After the installation is complete, keep the link for your installation window, and close the link window after verification is successful. Otherwise, you may have to ask the IDC staff for help ....
Problem description:
After installing denyhosts, as long as you log on, your IP address will be added to hosts. deny, and you will not be able to log on. I have never logged in. How can I go in?
Answer: You must have failed to log on to this IP address before. It exceeds the threshold value in your configuration file, so it will automatically help you add it.
Solution:
1. Clear the log file according to the secure_log in your denyhosts. cfg configuration.
For example,/var/log/secure.
The command is Echo "">/var/log/secure.
2. reset the system log counter. This step is required.
Command: Service rsyslog restart or service syslog restart
3. Service denyhosts stop stops the service.
4. Clear the IP records of Hosts. Deny in other files in the/usr/share/denyhosts/data directory.
PS: Check all files under data. None of them can be left. Otherwise, it is invalid.
5. Service denyhosts start starts the service.
6. Delete the IP address you want to unban from hosts. Deny and clear it. Save.
7. Restart/usr/share/denyhosts/daemon-control restart. Complete.
The steps above cannot be minimized. Otherwise it is invalid. The primary account has been tossing for 2 hours.
Note: you can add a whitelist. If allowed-hosts is not available, run echo '123456. 888. 123. * '>/var/lib/denyhosts/allowed-hosts to add one. change the IP address to your own.
Google: www.gaomn.com
Sexy: www.8kmm.com
Heat map: www.retu8.com
If centos uses denyhosts, it will automatically add its IP address to hosts. Deny.