Search
Close this search box.

SSH Key login with PuTTY

Table of Contents

How to get SSH Key login with PuTTY

What are SSH Key and PuTTy?

Secure Shell (SSH) is an interconnected system/structure protocol that contributes a safe and encrypted way to access remote servers or devices. It allows users to log in to a remote server or device and execute commands securely over an unsecured network. PuTTY is one of the most favored SSH clients on the Windows operating system. This article will discuss SSH key login with PuTTY, including its features, advantages, disadvantages, and how to set it up.

Why Use SSH Key Login with PuTTY?

SSH key login with PuTTY provides a secure and easy way to log in to a remote server or device. Instead of typing in a username and password every time you log in to a remote server, SSH key login uses a pair of cryptographic keys, a public key, and a general (public) key. The available (public) key is shared with the remote server or device, while the private key is kept secure on your local computer.

When you log in to the remote server or device, the server uses the public key to verify your identity, and the private key is used to decrypt the authentication request.

In a previous article

SSH key authentication Linux, we’ve discussed generating and using SSH keys for SSH login. This article continues the idea of public key ssh authentication for Windows users.

To recap: for the ssh key-based login to work, the ssh server needs to contain the ssh public key in its authorized_keys file of the ssh server. The private key must be in the ssh client’s possession and kept as a secret.

Unlike Linux/*BSD, Unix does not have an incorporated terminal, and the most famous ssh client for Windows is “PuTTY.” It is incompatible with the private key in the PEM format generated by ssh-keygen and needs to be converted to its 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 personal 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 anymore).
Open up the 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 log in with the new putty key or save the Session first.

You can do these actions on our platform in a 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.

Features of SSH Key Login with PuTTY

SSH key login with PuTTY has several features that make it an ideal choice for remote server access. Some of the key features are:

  1. Enhanced Security: SSH key login with PuTTY provides enhanced security compared to traditional username and password authentication. The use of cryptographic keys makes it almost impossible for an unauthorized user to gain access to the remote server or device.
  2. Improved Convenience: SSH key login with PuTTY improves convenience by eliminating the need to remember and type in a username and password whenever you log in to a remote server or device. Once the keys are set up, you can log in with a few clicks.
  3. Better Control: SSH key login with PuTTY provides better control over access to remote servers or devices. You can easily revoke access by removing the public key from the remote server or device.
  4. Time-Saving: SSH key login with PuTTY saves time by eliminating the need to type in a username and password whenever you log in to a remote server or device. This makes it ideal for frequent access to remote servers or devices.

Advantages of SSH Key Login with PuTTY

 SSH key login with PuTTY has several advantages over traditional username and password authentication. Some of the key benefits are:

  1. Enhanced Security: SSH key login with PuTTY provides enhanced security by eliminating the risk of password-based attacks. It also makes accessing the remote server or device more burdensome for unauthorized users.
  2. Improved Convenience: SSH key login with PuTTY improves convenience by eliminating the need to remember and type in a username and password whenever you log in to a remote server or device.
  3. Better Control: SSH key login with PuTTY provides better control over access to remote servers or devices. You can easily revoke access by removing the public key from the remote server or device.
  4. Improved Efficiency: SSH key login with PuTTY enhances efficiency by eliminating the need to type in a username and password whenever you log in to a remote server or device. This makes it ideal for frequent access to remote servers or devices.
  5. Compatibility: SSH key login with PuTTY is compatible with many remote servers and devices. This makes it an ideal choice for users who need to access multiple servers or devices.

Disadvantages of SSH Key Login with PuTTY

 SSH key login with PuTTY has some drawbacks that users should be aware of. Some of the critical disadvantages are:

  1. Complexity: SSH key login with PuTTY can be complex to set up and configure. Users need to have a basic understanding of cryptographic keys and how they work.
  2. Lack of Portability: SSH key login with PuTTY is less portable than username and password authentication. Users must have private keys to log in to remote servers or devices. This problem can be if the user can access the server or device from a different computer or location.
  3. Security Risks: SSH key login with PuTTY can pose security risks if the private key falls into the wrong hands. Users need to take measures to protect their private keys from theft or loss.
  4. Limited Support: SSH key login with PuTTY needs more support on some platforms. Users may need to use a different SSH client if they encounter compatibility issues.

Conclusion of SSH key and putty

 SSH key login with PuTTY provides a secure and convenient way to log in to remote servers or devices. It eliminates the need to remember and type in a username and password every time you log in and provides enhanced security by using cryptographic keys. However, it can be complex to set up and configure, and users need to protect their private keys from theft or loss. Overall, SSH key login with PuTTY is an excellent choice for users who need to access remote servers or devices frequently and require enhanced security.

 

setting-a-404-error-page-via-the-htaccess-file

You can use the same private key for multiple remote servers or devices. However, you must copy the public key to each server or device you want to access.

When generating the key pair, you can protect your private key by setting a passphrase. The passphrase will encrypt the private key, and you have to enter it every time you use it to log in to a remote server or device. It would be best to store the private key securely, such as an encrypted USB drive or a password-protected file.

RSA and DSA are popular public-key encryption algorithms for SSH key authentication. RSA keys are based on the difficulty of factoring large numbers, while DSA keys are based on the difficulty of computing discrete logarithms. Both types of keys are considered secure, but RSA keys are more widely used and supported.

Yes, PuTTY is available for Windows but not for Mac or Linux computers. However, you can use the built-in OpenSSH client on Mac and Linux to generate and use SSH keys.

Yes, SSH key authentication is a standard feature of the SSH protocol and can be used with other SSH clients besides PuTTY, such as OpenSSH on Linux and Mac computers

Make a Comment
Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Fast and Secure Cloud VPS Service

Try FREE
For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.