Some of the important server related problems will be solved only using shell access to the server. To access the cPanel server shell using SSH, there must be an SSH client installed on PC. Most of the Linux distros include SSH client software by default. If it is not installed, then it can be easily installed with following commands,
For Ubuntu: apt-get install openssh-client
For CentOS: yum install openssh-clients
After installation, follow these steps to access the cPanel shell with SSH from Linux:
- Login to cPanel and go to Security > SSH/Shell Access to generate SSH key pair.
- Click Manage SSH Keys > Generate a New Key. You should use a password to protect the key. You will be asked the password each time you use the key.
- In Public Keys section click ‘Manage Authorization’ and ‘Authorize’
- In Private Keys section click, Vew/Download then download the key (id_dsa or id_rsa) to your PC.
- Save it to ~/.ssh directory on your Linux machine under a meaningful name to not overwrite your existing keys for example id_dsa.myjavahost
- Now make sure permissions are correct on the key (one-time task) and connect:
Shell123mypc:~$ chmod 600 .ssh/id_dsamypc:~$ ssh -p1033 -i .ssh/id_dsa yourusername@yourservernameEnter passphrase for key '.ssh/id_dsa':
- Provide the password for the key, set up in step #2
You should be logged in by now.