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
- Go to the Bluehost Account Manager.
- Click the Hosting tab on the left-hand menu.
- Go to the Server Information section and click MANAGE KEYS.
- This will open the account’s SSH Management tab. Click ADD SSH KEY and choose a Key Name and include a Public Key.
- 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.
- Once in cPanel, go to the Security section and search for SSH Access. Click Manage SSH Keys after.
- 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.
- Click Generate Key.
- The location of the newly generated public and private key will be displayed, along with the key fingerprint.
- Click Go Back.
- Next to the public key you generated, click Manage.
- Click Authorize to activate this public key.
- Click Go Back.
- To the right of the private key, click View/Download.
- Click the Download Key button.
- 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:
- Download and open PuTTYgen from the PuTTY Download Page.
- Click the Load button and locate the private SSH key you downloaded.
You will need to choose to display All Files* from the menu to the right of the File Name field.
- Enter the password for your SSH Key.
- Click the Save private key button to create the PPK file.
Configuring PuTTY
Next, you need to configure PuTTY by following these steps:
- In PuTTY, under Session, enter your Host Name.
- Under Connection, click Data.
- Enter your cPanel username as the Auto-login username.
- Under SSH, choose the second option from the Preferred SSH Protocol Version.
- Under SSH -> Auth, specify where your private key can be found. Remember, this is where you saved the private key on your local computer.
- Click the Browse to locate the file on your computer.
- 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.
Write A Comment