Question
How to connect to a cPanel server via SSH?
Answer
Note: If your cPanel server is managed by a hosting provider, please contact the company that hosts your server and ask for the SSH connection details. For any issues during the connection, please contact your hosting support department.
Note: cPanel's Terminal feature must be enabled by your hosting provider or server administrator. If you don't see the Terminal option under the Advanced section of the cPanel dashboard, please contact your hosting provider to have it enabled for your account.
- Log in to the cPanel interface as the cPanel user account.
- Locate the Terminal module under the Advanced section of the cPanel dashboard.
- Access the SSH console as the cPanel user account.
- Log in to the WHM interface as the reseller or root user account.
- Locate the Terminal module under the Server Configuration section of the WHM dashboard.
- Access the SSH console as the reseller or root user account.
On Linux, use the built-in Terminal application, which is available in all major Linux distributions. The exact location varies depending on your Linux distribution and desktop environment, for example, it may be found under Applications > Terminal, Activities > Terminal, or accessible via a keyboard shortcut such as Ctrl + Alt + T. You can log in using either a password or an SSH key.
Log in with a Password
- Open the Terminal application.
-
Run the following command to establish an SSH connection:
ssh -p 22 username@203.0.113.2
Note: Please replace
username,203.0.113.2, and22with the actual username, IP address, and port number of your SSH login credentials. When prompted, enter your account password to complete the login.
Log in with an SSH Key
- Open the Terminal application.
-
Run the following command to establish an SSH connection:
ssh -p 22 -i /home/username/.ssh/mykey username@203.0.113.2
Note: Please replace
/home/username/.ssh/mykey,username,203.0.113.2, and22with the actual path to your SSH key, username, IP address, and port number of your SSH login credentials. If your key is password-protected, enter the passphrase when prompted; otherwise press Enter.
Use one of the following programs for Windows OS to establish an SSH connection to a remote server:
On macOS, use the built-in Terminal application, which is available in every macOS distribution. You can find it under Applications > Utilities > Terminal. You can log in using either a password or an SSH key.
Log in with a Password
- Open the Terminal application.
-
Run the following command to establish an SSH connection:
ssh -p 22 user@203.0.113.2
Note: Please replace
user,203.0.113.2, and22with the actual username, IP address, and port number of your SSH login credentials. When prompted, enter your account password to complete the login.
Log in with an SSH Key
- Open the Terminal application.
-
Run the following command to establish an SSH connection:
ssh -p 22 -i /Users/user/.ssh/mykey user@203.0.113.2
Note: Please replace
/Users/user/.ssh/mykey,user,203.0.113.2, and22with the actual path to your SSH key, username, IP address, and port number of your SSH login credentials. If your key is password-protected, enter the passphrase when prompted; otherwise press Enter.
Comments
0 comments
Article is closed for comments.