Access the command line
To access your cPanel & WHM server from the command line, perform the following steps:
-
Use the correct method for your computer’s operating system to open the CLI:
- Microsoft Windows® — Open the Command Prompt program. To do this, click Start and enter
Command Prompt
in the Search text box. Double-click Command Prompt in the list that appears. - macOS® — Open the Terminal program. To do this, click the Applications icon in the dock, click the Utilities icon, and then click the Terminal icon.
- Ubuntu — Open the Terminal program. To do this, press the
Ctrl
,Alt
, andT
keys simultaneously.
- Microsoft Windows® — Open the Command Prompt program. To do this, click Start and enter
-
Your CLI program opens with access to the local computer. You must use SSH to access the cPanel & WHM server. To do this, enter the following command and press Enter:
ssh username@hostname
username
is your account’s username andhostname
is the server’s hostname. For example, to log in as theroot
user on theexample.com
server, run the following command:ssh root@example.com
-
The CLI prompts you for the account’s password. Enter it and press Enter.
-
The CLI’s display will appear similar to the following example:
1 2 3 4 5
Last login: Fri Feb 6 12:50:38 on ttys000 MyComputer:~ myname$ ssh username@example.com Password: Last login: Fri Feb 6 12:52:33 2015 from 10.1.4.202 username@example [~]#
If you receive an error message that appears similar to the following example, you may not have SSH privileges enabled on the server.
ssh: connect to host example.com port 22: Connection refused
You have to contact us because we are usually changing our ssh port for a security matter.