Sometimes it's quicker to administer a server via SSH, rather than logging into the WHM control panel and using the Graphical User Interface.
The whmapi1 command line tool is very useful for performing certain WHM administration tasks via SSH.
The following whmapi1 commands should work on any WHM/cPanel server, no matter what distribution it's running.
For example, if you want to add the IP address 126.96.36.199 with netmask 255.255.255.0 to your server:
1. SSH to your server.
# ssh email@example.com -p 22
2. Enter the whmapi1 command:
# whmapi1 addips ips=188.8.131.52 netmask=255.255.255.0
3. Make sure the new IP is reachable by pinging it:
# ping 184.108.40.206
If you made a mistake for any reason, you can remove the IP with the following command:
# whmapi1 delip ip=
Once the new IP is added and verified as working, you can begin assigning cPanel accounts to the IP as needed:
# whmapi1 setsiteip ip=
You can check which IP an account is currently using:
# whmapi1 get_shared_ip user=cpanelusername
Or list all IP's configured on the server:
# whmapi1 listips
If you have any issues with the above process, please feel free to submit a support ticket for further assistance.