Note: I use Hostmonster, I can’t test elsewhere, but I think these steps will work for Bluehost too.
I don’t understand why most tutorials on hostmonster and bluehost are incomplete, they have one of the best shared hosting service, one of the best support teams… but there knowledge base is not that shiny. Well, this detailed tutorial from hostmonster helpdesk didn’t work for me, there is one step missing, so here it is again, how to connect to hostmonster SSH with a private ssh key using PuTTy… euh PuTty… euh… sorry… it’s PuTTY
Generate Keys
- Go to your CPanel -> SSH/Shell Access -> Manage SSH Keys
- Go to Generate a new key and fill in the fields,
- leave the password empty (I couldn’t make it work with a password)
- for added security set the Key Type to RSA and Key Size to 4096
- Click Generate Key, then Go Back
- On the table Public Keys, Click Manage Authorizations near the key you added a few moment ago, Authorize on the next page and then Go back
- On the table Private Keys click View/Download
- On the bottom of the page click Convert then Download Key on the next page, save it somewhere on your computer.
PuTTY
From Hostmonster helpdesk:
Configuring PuTTY:
- In PuTTY, under Session, enter your Host Name
- Under SSH, choose 2 from Preferred SSH Protocol Version
- Under SSH -> Auth in PuTTY, you will need to specify where your private key can be found. Remember this is where you saved the private key on your local computer. Click Browse to locate the file on your computer.
- If you wish to have your username automatically sent to the server when connecting, under Connection -> Data in PuTTY, you will see a field for “Auto-login username”. Type your account username there.
- Save your settings to be used in future sessions – Under Sessions, type a name (such as “my site”) in the Saved Sessions box and click Save.