How to connect to SSH using Putty?

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.

    Type id_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.

  1. Start Putty.

  2. Go to Connection > SSH > Auth > Credentials in the Category panel on the left.

  3. Click "Browse" under "Private key file for authentication".

  4. Select the id_rsa.ppk file you created earlier.

  5. Click "Session" in the Category panel.

  6. Enter the following:

    Host Name (or IP address): username@server.example.com
    Port: 2022
    Connection Type: SSH
    Saved Sessions: MechanicWeb

    *Replace username with your cPanel/DirectAdmin username.
    *Replace username with root if you are connecting to a VPS/Dedicated Server as the root user.
    *Replace server.example.com with your server hostname or IP address.

  7. Click "Save" to save the configuration.

  8. Select "MechanicWeb" under "Saved Sessions".

  9. Click "Open".

  10. 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.

 

  • 372 Users Found This Useful
Was this answer helpful?

Related Articles

How to limit the number of FTP connections?

When uploading a large number of files, we recommend you limit the number of FTP connections....

How to upload a large number of files quickly via FTP or File Manager?

Uploading a large number of times usually takes a lot of time. Your computer and server traverse...

How to enable and access SSH?

SSH remains disabled by default on all hosting accounts (excluding VPS and Dedicated Server). If...

How to connect to SSH from Mac?

SSH access must be enabled for your hosting account (excluding VPS and Dedicated Server) to...

How to authorize your public key in cPanel and DirectAdmin?

cPanel and DirectAdmin provide a seamless interface to authorize your public key. Authorizing the...