Access your cPanel account via SSH

Author
By Darío Rivera
Posted On in SSH

How many times have you not hired your own hosting service with cpanel or managed the service of some company and you want to enter through the Linux, Windows or MacOS terminal. To do this, you must do the following:

Step 1

In case you don't have an rsa key, the first step is to create one. To do this, just execute the following command:

ssh-keygen -t rsa

At this point, it is recommended that you type a passphrase, that is, that you create the encrypted key. The product of this command will be the private key and the public key which will generally be id_rsa and id_rsa.pub.

Step 2

The next step will be to log in to cpanel and go to the Security > SSH Access option. You can also use the search engine and type ssh to get a much faster link.

Step 3

In this step, you must click on the Manage SSH Keys button and then on Import Key.

Step 4

In this step, you must copy and paste the contents of the id_rsa.pub file into the box provided for the public key, which should have a label similar to the following: "Paste the public key into the following text box:". In the first box of the form, you must enter a name with which the configuration will be saved.

Step 5

After importing the public key, you should follow the Back to Manage Keys link and look for the record in the table of public keys. You must follow the Manage link and click on the Authorize button. After this, your key will be imported and authorized.

Step 6

From a terminal, you must launch the command to enter through ssh like this.

ssh username@domain

The user and domain you will generally find in the dashboard in the GENERAL INFORMATION box as Current user and Primary domain. If you have several SSH private keys, it is necessary to explicitly indicate the key you will use with the -i option.

ssh -i /path/to/private/key root@203.0.113.0

Acerca de Darío Rivera

Author

Application Architect at Elentra Corp . Quality developer and passionate learner with 10+ years of experience in web technologies. Creator of EasyHttp , an standard way to consume HTTP Clients.

LinkedIn Twitter Instagram

Sólo aquellos que han alcanzado el éxito saben que siempre estuvo a un paso del momento en que pensaron renunciar.