Log into a linux server using a private key

Log in to a Linux server with an SSH private key on a Windows client


This article demonstrates how to load an SSH private key into PuTTY in order to connect to a Linux® server. You need the following software to complete this task:

  1. PuTTY: A client for managing SSH sessions
  2. PuTTYgen: A tool for managing and creating SSH key pairs

To download both tools, see Download PuTTY: latest release.

Save your private SSH key to a text file

As a part of your deployment Infofractal provides the private key in your control panel.

Open a text editor, paste your SSH private key, and save the file.

Your SSH private key should look similar to the key in the following image:

 

 You need to include all of the text that appears in the image in your key file.

 

Load your SSH private key in PuTTY Key Generator

Use the following steps to load your SSH private key in PuTTY Key Generator:

  1. Launch PuTTY Key Generator.

  2. In the Actions section, click Load to load an existing private key file. Change the file type to search for to All Files.

  3. Select the key that you saved to a text file earlier and click Open.

    A confirmation displays after PuTTYgen successfully imports the private key. Click OK to dismiss the message.

  4. Click Save private key, then enter a file name in the Save private key as dialog box to save it for use with PuTTY.

    Note: We strongly recommend that you keep the default settings.

Log in to PuTTY by using your SSH private key

Use the following steps to log in to PuTTY by using your SSH private key:

  1. Enter a name for the session and click Save.

    Note: You can use any name that you want. This example names the session based on the Internet Protocol (IP) address of the server to which the user is connecting.

  2. Click Connection > Data in the left navigation pane and set the Auto-login username to centos, ubuntu, debian, etc, depending on your VPS Linux distribution.

  3. Click Connection > SSH > Auth in the left navigation pane and configure the SSH private key to use by clicking Browse under Private key file for authentication.

  4. Navigate to the location where you saved your SSH private key file, select the file, and click Open.

    The file path for the SSH private key file now displays in the Private key file for authentication field.

  5. Click Session in the left navigation pane, then click Save in the Load, save or delete a stored session section.

  6. Click Open to begin your session with the server.

    If you saved your SSH private key with a passphrase, you’re prompted to enter that passphrase. An alert displays indicating that the server’s host is not cached. Click Yes to continue the connection.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Log in a un server linux usando una llave privada

Log in a un servidor Linux con una llave privada en Windows Este artículo le enseñará a como...

Order is blocked as Fraud

Our system will block any order created while using a public VPN. Disable your VPN before ordering.