SSH access is available for all hosting accounts. It is enabled by default on VPS and Dedicated Servers. For all other hosting services, contact us to enable SSH for your account.
Note:
Commands executed via SSH can render your server or hosting account inoperable. We strongly recommend that only users with command-line experience use SSH.
Step 1: Generate Public and Private Keys Using Putty
You can use any SSH/SFTP client to generate your key pair. We are using Putty in this article:
- Download and install the latest version of Putty from the below URL:
https://www.putty.org/
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Start PuTTYgen.
- Select "SSH-2 RSA" under Parameters.
If you do not find "SSH-2 RSA", click "Key" from the top menu and click "SSH-2 RSA key". - Enter 2048 in "Number of bits in a generated key".
- Click "Generate".
- Move the mouse around until the progress bar reaches 100%.
- Click "Save private key".
Click "Yes".
Choose a directory to store the key.
Typeid_rsa.ppk
as the file name.
Click "Save". - Copy the text displayed in the Public key field.
Optionally, you can save the public key as "id_rsa.pub" as the file name. - Close PuTTYgen.
Step 2: Authorize the Public Key
To connect to SSH or SFTP, you must authorize your public key. Once authorized, you can use the private key in your SSH/SFTP client to connect.
How to authorize your public key in cPanel and DirectAdmin?
Step 3: Connect to SSH Using Putty
We are using Putty in this article. You can use any SSH/SFTP client to connect.
- Start Putty.
- Go to Connection > SSH > Auth > Credentials in the Category panel on the left.
- Click "Browse" under "Private key file for authentication".
- Select the
id_rsa.ppk
file you created earlier. - Click "Session" in the Category panel.
- Enter the following:
Host Name (or IP address): username@server.example.com
Port: 2022
Connection Type: SSH
Saved Sessions: MechanicWeb
*Replaceusername
with your cPanel/DirectAdmin username.
*Replaceusername
withroot
if you are connecting to a VPS/Dedicated Server as theroot
user.
*Replaceserver.example.com
with your server hostname or IP address. - Click "Save" to save the configuration.
- Select "MechanicWeb" under "Saved Sessions".
- Click "Open".
- Done!
Terminal in cPanel/WHM
The Terminal interface in cPanel and WHM allows you to access SSH without authorizing a public key.
cPanel: Go to cPanel > Advanced > Terminal
WHM: Go to WHM > Server Configuration > Terminal
*For WHM, you will need a VPS/Dedicated Server with root access.