Update: Instructions take now the user name into account, not defaulting to root.
So the other day I wanted to set up SSH with public keys through putty so I could connect to WHM. While I did find the instructions on how to do it, the instructions were lacking a lot of information. After a lot of google I was able to figure it out. So I figure I would share the steps I took. Here is a step by step guide that should make someone’s life a little easier:
Part A – Setting up your Public Keys
1- Log in into your WHM and go to “SSH Password Authorization Tweak” under “Security Center”
2- Disable Password Auth – this is so we can only access ssh with a key
3 – Go to “Manage root’s SSH Keys” under “Security Center”
4 – Click on “Generate a New Key”
5 – On the key name, use the username you wish to login as. For example ‘root’ then create a password
6 – Click Generate Key
7 – Go back to “Manage root’s SSH Keys” and click on “Manage Authorization” on the public key
8 – Enable authorization and go back to “Manage root’s SSH Keys”
9 – click on “View/Download” on the private key
10 – type the password you used when creating the key into the passphrase box and click “Convert”
11 – copy the text generated and save it to your desktop in a file with extension .ppk (you can name this whatever you want)
Part B – Connecting with Putty
For putty to use the private key correctly you need to open the private key with “pageant” this is provided for free with putty if you use the everything installer or downloaded individually from putty’s download page. I recommend you download the “Windows Installer for Everything” from:
1 – Open the .ppk file with Pageant if you used the installer and did not change the default file association settings then you should be able to just double click the file.
2 – You will be asked for the password – enter the password used in the creation of the key
3 – Open Putty and enter the address of your web server – Make sure you click on SSH
4 – When you click connect type the user we set up when creating the key in this case it was root
If everything was setup right you should have SSH access to your web server now
Leave a Reply