You can generate an SSH key on Windows using the PuTTY SSH client. You can download PuTTY for free from this URL.
To generate a key with PuTTY, you should:
- Download and start the puttygen.exe generator.
- In the "Parameters" section choose SSH2 DSA and press Generate.
- Move your mouse randomly in the small screen in order to generate the key pairs.
- Enter a key comment, which will identify the key (useful when you use several SSH keys).
- Type in the passphrase and confirm it. The passphrase is used to protect your key. You will be asked for it when youconnect via SSH.
- Click "Save private key" to save your private key.
- Click "Save public key" to save your public key.
The IP address from which you have ordered your Dedicated Server was automatically added in the server firewall. If you intend to establish the WHM and SSH connections using another IP address you should request it to be added in the firewall by our team. Access from your IP address should be allowed for the SSH port on the server. You can request this by posting a ticket in the Port Opening Request category.
Once you have generated your public and private SSH keys, you should add the public key through your WHM.
To do so, log in to your server's WHM panel as root and go to Manage SSH Keys located in the Security section. Click the Import Key button. Type in a name and a passphrase for the key and paste your public key in the corresponding field. You should NOT paste your private key. Click Import to import your key.
You will now be able to connect to your Dedicated Server via SSH.
At this point you will have to load the private key you already generated. You can do so via pageant.exe program which can be downloaded from this URL.
Once downloaded, start the program and load your private key in it. If you have generated your key with a passphrase, you will be asked for it.
Then you should start putty.exe and enter the connection details in the Session category:
- Host Name (or IP address) - here you should enter the hostname/IP of the Dedicated Server.
- Port - the port for the connection
- Protocol - you should select SSH
Enter the details and click on Open to establish the connection. You will be asked for a username. You should use root as username. Enter it and you will be logged in using the SSH key pair.
You need help managing your dedicated server? We got it! SiteGround experts not only write helpful articles, but also manage the servers for our clients so they don’t have to read articles like this one.Learn more.