Global Header
7 Mins Read

How To Use SSH on Windows PuTTY – Generate Public/Private Key Pair & File

Home Blog Security How To Use SSH on Windows PuTTY – Generate Public/Private Key Pair & File
putty ppk file

When you log into SSH, it’s possible to use a public/private key for authentication, which offers both convenience and security. This means that the unique public and private keys are used to authenticate instead of providing a username and password. This way, you can ensure secure authentication without needing a password. If you prefer, you can also generate the keys with a password different from your cPanel password.

Generate a Public/Private Key Pair

  1. Go to the Bluehost Account Manager.
  2. Click the Hosting tab on the left-hand menu.
    Hosting tab in the Bluehost account manager
     
  3. Go to the Server Information section and click MANAGE KEYS.
    Manage Keys under Server Information in the Hosting tab the Bluehost Account Manager
     
  4. This will open the account’s SSH Management tab. Click ADD SSH KEY and choose a Key Name and include a Public Key.
    SSH Management- Add SSH Key

    Add a Public Key
  5. From here, you will need to access your cPanel to generate a new key. You can click the Hosting tab. In the Overview section, click the cPanel button below.
    Hosting tab - Overview -cPanel button
     
  6. Once in cPanel, go to the Security section and search for SSH Access. Click Manage SSH Keys after.
    cPanel Dashboard - Security - SSH Access
     
  7. In the cPanel SSH Access page, click Generate a New Key and fill out the fields as prompted. We recommend using the RSA key type and 4096-bit key size for maximum security.Please be aware that a bug in cPanel prevents you from creating a 2048 or 4096-bit DSA key.
  8. Click Generate Key.
    Bluehost cPanel SSH Access Generate Keys
  9. The location of the newly generated public and private key will be displayed, along with the key fingerprint.
    Bluehost cPanel SSH Access Generate Keys Result
  10. Click Go Back.
  11. Next to the public key you generated, click Manage.
    Bluehost cPanel SSH Access Public Keys Manage
     
  12. Click Authorize to activate this public key.
    Bluehost cPanel SSH Acces Public Keys Authorize
  13. Click Go Back.
  14. To the right of the private key, click View/Download.
    Bluehost cPanel SSH Access Public Keys Download
  15. Click the Download Key button.
    Bluehost cPanel SSH Access Public Keys Download Key
     
  16. Save the file to your computer.

That’s it! You’ve successfully generated a public/private key pair.

You can now use SSH securely to our server by using the private key saved on your computer. If you are using PuTTY, follow the steps below to configure it.

Generate a PPK File

On how to generate a PPK file, follow these steps:

  1. Download and open PuTTYgen from the PuTTY Download Page.
  2. Click the Load button and locate the private SSH key you downloaded.
    Load your private keyYou will need to choose to display All Files* from the menu to the right of the File Name field.
  3. Enter the password for your SSH Key.
    Enter the passhrase for your SSH key
     
  4. Click the Save private key button to create the PPK file.
    Save the PPk file
     

Configuring PuTTY

Next, you need to configure PuTTY by following these steps:

  1. In PuTTY, under Session, enter your Host Name.
    Enter your host name or IP Address
     
  2. Under Connection, click Data.
  3. Enter your cPanel username as the Auto-login username.
    Enter your cPanel username
     
  4. Under SSH, choose the second option from the Preferred SSH Protocol Version.
  5. Under SSH -> Auth, specify where your private key can be found. Remember, this is where you saved the private key on your local computer.
  6. Click the Browse to locate the file on your computer.
    Click Browse to locate your ppk file
     
  7. Under Sessions, type a name (such as “my site”) in the Saved Sessions box and click Save.

Summary

This guide teaches you how to securely use SSH with PuTTY on Windows by focusing on public/private key authentication for added security and convenience. You’ll start by generating a key pair through your control panel, following the steps within the Bluehost account manager, and activating your public key.

To access SSH securely, you’ll create a PPK file using PuTTYgen. This is where you’ll load your private key, enter a passphrase, and save the PPK file. You’ll then have to configure PuTTY by entering your host name and cPanel username, choosing the SSH protocol version, and specifying the location of your private key. Once you’re connected, you can use SSH commands to manage your server. We hope this guide has been helpful.

  • I’m a web hosting and WordPress enthusiast dedicated to helping you enhance your online presence. I love making tech simple and accessible for everyone with my writing.

Learn more about Bluehost Editorial Guidelines
View All

Write A Comment

Your email address will not be published. Required fields are marked *

Longest running WordPress.org recommended host.

Get Up to 61% off on hosting for WordPress Websites and Stores.