How to Forcefully Suspend a cPanel Account via SSH
To forcefully suspend a cPanel account via SSH, you must be logged in as the root user. The primary command for this task is a WHM API call, and it is a powerful action that immediately terminates all services for the account, including websites, email, and FTP access.
Step 1: Log in via SSH
Connect to your server using an SSH client. You must use the root
user to execute the suspension command.
ssh root@your_server_ip
Step 2: Run the Suspension Command
The command to suspend a cPanel account uses the whmapi1
tool, which is cPanel’s command-line interface for the WHM API.
whmapi1 suspendacct user=cpaneluser reason="Reason for suspension"
whmapi1 suspendacct
: This is the API function for suspending an account.user=cpaneluser
: Replacecpaneluser
with the actual username of the cPanel account you want to suspend.reason="Reason for suspension"
: This is an optional but recommended parameter. The reason you provide will be visible in the WHM interface and can help you and other administrators remember why the account was suspended.
After running the command, you will receive a confirmation message indicating whether the suspension was successful.
Step 3: Un-suspending the Account
To reverse the suspension, you can use a similar command:
whmapi1 unsuspendacct user=cpaneluser
This command will restore all services for the specified cPanel account.