PuTTY and WHM SSH Key Generation

aleangelico

New Member
Hi, I took me a few hours to figure this out, hope this help

If you want to use public/private key for SSH authentication, and you are using PuTTY as SSH client, follow this steps

note: you should change "mysystem" for any name, in fact I use the server ip address
passphrase is en fact a password, but you should use a long one, that's the "phrase" part

1. Generate a new key at WHM Security Center -> Manage root's SSH Keys
Key name: mysystem
Key password: [enter your passphrase]
Key type:RSA
Key Size: 1024
2. Authorize.
Under Publick keys,
click "Manage Authorization"
Authorize
3. under Private Keys
View/Download key
DO NOT USE PuTTY CONVERT TO PPK FORMAT, DOESNT WORK
At your PC create a text file "mysystem_OpenSSH.txt"
Copy and paste Private Key mysystem (OpenSSH format) content
4. Open PuTTYGEN
Menu Conversions -> Import Key
Choose the just created file "mysystem_OpenSSH.txt"
Click [Save private key]
Save as "mysystem_privatekey.ppk"
5. Open PuTTY (if you are going to use Pageant, jump to step 7)
Fill your system data or load the session if you saved it (address, port, etc)
Go to Connection -> SSH -> Auth
Click [Browse] butto at "Private key file for authentication"
Chose the just created file "mysystem_privatekey.ppk"
6. Click [Open] and this should open a new sesion using the key (will ask for passphrase)

7. If you dont want to write the passphrase every time you have to use Pageant. IF SO, YOU DONT NEED STEP 5
7.1 Run Pageant.exe, will sit at the icon tray
7.2 Right mouse button on the icon -> Add key
7.3 Selecct the private key (same as step 5)
7.4 will ask for the passphares, input it
7.5 That't it,while Pageant is at the system tray, PuTTY will login automaticaly

8. Login with PuTTY and check if you can log in with the public/private key
If everything is working properly:
go to SSH Password Authorization Tweak and click [Disable Password auth]
After this the only way to use SSH will be using the public/private key scheme. This is WHY you did all this.
 
Hello aleangelico,

Glad to see you got SSH keys working :) although a word against turning off password authentication. KH support cannot log in if you turn it off ;)
 
Hello aleangelico,

Glad to see you got SSH keys working :) although a word against turning off password authentication. KH support cannot log in if you turn it off ;)
uh, I didn't realize about support, but I think its better to just enable the password authentication if I open a ticket... or do they need to login on regular basis for maintenance?

Regards
Alex
 
As far as I know they do not log in unless you send in a ticket. The thing is if you can't log in to your VPS and you need their help then you can't log in to enable it...
 
Top