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:
- PuTTY: A client for managing SSH sessions
- PuTTYgen: A tool for managing and creating SSH key pairs
To download both tools, see Download PuTTY: latest release.
Note: These instructions apply to using PuTTY on the Windows® operating system. For information about using SSH private keys on Linux and OS X® operating systems, see Log in with an SSH Private Key on Linux and Mac.
Save your private SSH key to a text file
As a part of your deployment, Rackspace might have provided you with an SSH private key for you to use to authenticate against your newly deployed Linux servers. You must save this private key to a text file. This type of file is called a key file.
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:
Launch PuTTY Key Generator.
In the Actions section, click Load to load an existing private key file. Change the file type to search for to All Files.
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.
Enter a unique key passphrase in the Key passphrase field, then enter the same passphrase again in the Confirm passphrase field. You are prompted for this passphrase whenever you log in to a server by using your SSH private key.
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:
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.
Click Connection > Data in the left navigation pane and set the Auto-login username to root.
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.
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.
Click Session in the left navigation pane, then click Save in the Load, save or delete a stored session section.
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.
©2020 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License