Disable cPHulk from the shell

If you’ve ever found yourself blocked by cphulk (typically this occurs because there have been too many failed logins by username or IP) and are still able to access the system the following will disable cphulk:

/usr/local/cpanel/etc/init/stopcphulkd
/usr/local/cpanel/bin/cphulk_pam_ctl --disable

 
another method is to clear the cphulk database (please note this will remove ALL current blocked usernames and IP addresses so I do not recommend it):

mysql -u root
use cphulkd;
delete from brutes;
delete from logins;

 
TIP: If you are unable to access the system by ssh because you’ve been blocked by cphulk try rebooting the system, and connecting as quickly as possible. You can use ping to monitor the server while it reboots. Once the server starts responding to ping you will able to access it a few seconds later. This is because sshd starts before cpanel does therefore allowing you to access the server bypassing cphulk if you catch it quick enough.

Share this Post