How To Connect AWS EC2 Linux Instance Using SSH Client Putty From Windows

In this article, I will tell you how to connect the AWS ec2 Linux instance using SSH from windows. The SSH client is Putty which is free and you can download it from the internet.

1. Download & Install Putty.

  1. You should first download & install the putty software from the putty official website.
  2. After installing the putty, you can find 2 applications PuTTY & PuTTYgen.
  3. These 2 applications are very useful and we will use them later.

2. Using PuTTYgen To Convert .pem File To .ppk File.

  1. Open the PuTTYgen application.
  2. Click the Load button to open the browse file window.
  3. Select the AWS SSH used .pem file, you can do this by changing the file types to all files in the file types drop-down list.
  4. After selecting, it will pop up an alert dialog saying Successfully imported the key .etc.
  5. Click the OK button in the pop-up alert dialog.
  6. Then you can see the key text in the public key text area.
  7. Select the RSA radio button in the Type of key to generate section.
  8. Click the Save private key button to save the private key to a .ppk file in the computer.
  9. Now you have successfully converted the AWS SSH used .pem file to a .ppk file.
  10. PuTTY client will use the .ppk file to connect to the AWS ec2 Linux instance using SSH.

3. Using PuTTY To Connect To AWS EC2 Linux Instance.

3.1 Input AWS EC2 Linux Instance Address.

  1. Open the PuTTY client, and click the Session item in the left Category list.
  2. Input the AWS ec2 instance address such as ec2-user@ec2-******.ap**** in the Host Name (or IP address) text box.
  3. You can get the instance address by right-clicking the EC2 instance in the AWS console, then clicking the Connect item in the popup menu list, then clicking the SSH client tab.
  4. The default user name should be ec2-user and not root, this is because of security reasons.
  5. The Port number is 22, you do not need to change it.
  6. Select the SSH radio button in the Connection type section.
  7. Input a name in the Saved Sessions text box and click the Save button to save it, then you can use it later easily by loading it again.

3.2 Keep PuTTY Connect To SSH Server Without Lose Connection.

  1. Click the Connection item under the Category list in the left pane.
  2. Input a number such as 180 in the right pane text box Seconds between keepalives(0 to turn off).
  3. Then PuTTY client will keep alive with the Linux SSH server every 3 minutes, it will not lose connection to the SSH server.

3.3 Use PuTTY Private Key File For Authentication.

  1. Click the Connection —> SSH —> Auth —> Credentials item in the PuTTY Configuration window left pane.
  2. Then click the Browse button on the right pane after the Private key file for authentication text box.
  3. Select the .ppk file which you converted in section 2.
  4. Click the Session item in the left pane and click the Save button to save all the configurations.
  5. Then click the Open button to connect to the SSH server.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.