In a previous article (https://vpsie.com/ssh-key-authentication-linux-vps-server/), we’ve discussed about how to generate and use ssh keys for SSH login. This article continues the idea of public key ssh authentication for Windows users.
To recap: for ssh key based login to work, the ssh server needs to contain the ssh public key in it’s authorized_keys file of ssh server. The private key must be in the possession of the ssh client and must be kept as secret as possible.
Unlike Linux/*BSD, Unix does not have an incorporated terminal and the most famous ssh client for Windows is “PuTTY”. It is not compatible with private key in PEM format generated by ssh-keygen and it needs to be converted to it’s own format.
Prerequisites of ssh private key conversion
For ssh private key conversion to putty format, download “puttygen.exe” from the internet. Then copy the contents of the private key into a file on the disk (a location as private as possible) i.e: my_ssh_key.
Convert SSH Private key to PuTTY format using puttygen.exe
Open puttygen.exe, go to File->Load private key->Go to destination folder holding the private key ->Select “All files” -> Select the file “my_ssh_key”->Press Open
At this point, PuTTY Key Generator will ask for the decryption passphrase if the ssh private key was originally encrypted.
A message “Successfully imported foreign key” will appear. Next, press the “Save private key” button and select the destination file for the PuTTY format private ssh key.
Using PuTTY private key
Now that we have converted the private key to PuTTY format, some cleanup is required (remove the original format key if it’s not needed any more).
Open up PuTTY program and input the Host Name or IP Address, Scroll down to Connection->SSH->Auth->Press Browse and select the PPK key from the destination saved by puttygen.exe.
You may go back to Session and either login with new putty key or save the session first.
You can actually these actions on our platform in few minutes utilizing our PCS (Private Cloud Solution) which allows you to have VPSie(s) on a private network – NAT – Port forward – traffic control for inbound and outbound – multiple gateway IPs which you could use for the load-balancing and failover.