--- title: "How to add an IP to a WHM/cPanel server via SSH" slug: "how-to-add-an-ip-to-a-whmcpanel-server-via-ssh" updated: 2026-04-13T03:36:50Z published: 2026-04-13T03:36:50Z canonical: "docs.serversaustralia.com.au/how-to-add-an-ip-to-a-whmcpanel-server-via-ssh" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.serversaustralia.com.au/llms.txt > Use this file to discover all available pages before exploring further. # How to add an IP to a WHM/cPanel server via SSH 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 work on any WHM/cPanel server, no matter what distribution it's running. To demonstrate, adding an IP address [221.121.xxx.xxx](http://221.121.xxx.xxx) with a subnet mask of 255.255.255.0 to your server utilising whmapi1 would be as follows: 1. Connect to your server via SSH to begin using the details you have been provided: ```plaintext ssh -p 22 root@your.server.ip.address ``` 1. Enter the following ‘whmapi1‘ command to add an IP address and subnet. ```plaintext whmapi1 addips ips=221.121.xxx.xxx netmask=255.255.255.0 ``` 1. Make sure the new IP address is reachable by pinging it outside of your active SSH session. ```plaintext ping 221.121.xxx.xxx ``` 1. Once the new IP address is added and verified as working, you can assign the IP to a cPanel account. You can also assign the IP to multiple accounts. ```plaintext whmapi1 setsiteip ip=221.121.xxx.xxx user=cpanel_username ``` 1. If needed, you can check which IP address an account is currently in use: ```plaintext whmapi1 accountsummary user=cpanelusername ``` To list all IP addresses configured on the server for each user ```plaintext whmapi1 listaccts | grep -E 'user|ip:' ``` You can also remove the IP address with the following command: ```plaintext whmapi1 delip ip=221.121.xxx.xxx ``` To confirm that the IP has been removed ```plaintext whmapi1 listips ``` If you have any issues with the above process, please feel free to submit a support ticket for further assistance.