×


Connect Amazon EC2 using putty - Follow these steps

PuTTY is open source SSH and telnet client software that allow you to remotely connect to your Amazon EC2 instance to install / update operating system, software, package, and so on.

Are you trying to Connect Amazon EC2 using puttyv? We can help you.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related AWS SSH queries.

In this context, we shall look into how to Connect Amazon EC2.


Steps to Connect Amazon EC2 using putty

1.Check whether instance is ready.

  • Firstly, make sure that EC2 instance setup is ready.
  • After launching an instance, it can take a few minutes for the instance to be ready so that you can connect to it.
  • Check whether your instance has passed its status checks.
  • You may view this  from Status check column on the Instances page.


2. Install putty on the local computer.

  • Download and install PuTTY from the PuTTY download page.
  • Next, click on "click to install" option to install the software.
  • Then, the installer asks for the Destination folder in which to install the software. It is best to use the default value. Just click Next.
  • When the installation has completed successfully, it should show a "Completed" screen.
  • Click Finish to exit the installer.


3.Convert your private key using PuTTYgen

Locate the private key (.pem file) for the key pair that you specified when you launched the instance.

Then, convert the .pem file to a .ppk file in order to use with PuTTY.

PuTTY provides a tool named PuTTYgen, which converts keys to the required format for PuTTY.

In order to convert your private key please follow the below steps:

  • From the Start menu–>choose All Programs—>PuTTY—>PuTTYgen.
  • Under Type of key to generate, choose RSA. If your version of PuTTYgen does not include this option, choose SSH-2 RSA.
  • Next, choose Load. PuTTYgen displays only files with the extension .ppk. To locate your .pem file, choose the option to display files of all types.
  • Then, select all file types
  • Next, select your .pem file for the key pair that you specified when you launched your instance and choose Open. PuTTYgen displays a notice that the .pem file was successfully imported. Choose OK.
  • To save the key in the format that PuTTY can use, choose Save private key. PuTTYgen displays a warning about saving the key without a passphrase. Choose Yes.
  • Finally, specify the same name for the key that you used for the key pair and choose Save. PuTTY automatically adds the .ppk file extension.

Your private key is now in the correct format for use with PuTTY. You can now connect to your instance using PuTTY's SSH client.


4. Connect to your Linux instance

In order to connect to Linux Instance, do the following.

i. From the Start menu–>choose All Programs—>PuTTY.


ii. In the Category, choose Session and complete the below fields:

In the Host Name box, try one of the following:

  • (Public DNS) To connect using your instance’s public DNS name, enter my-instance-user-name@my-instance-public-dns-name.
  • (IPv6) Alternatively, if your instance has an IPv6 address, to connect using your instance’s IPv6 address, enter my-instance-user-name@my-instance-IPv6-address.
  • Ensure that the Port value is 22.
  • Finally under Connection type, select SSH.


iii. You can configure PuTTY to automatically send ‘keepalive’ data at regular intervals to keep the session active. In the Category, choose Connection, and then enter the required interval in the Seconds between keepalives field.


iv. In the Category pane–>expand Connection—>expand SSH, and then choose Auth. Complete the following:

  • Choose Browse.
  • Select the .ppk file that you generated for your key pair and choose Open.


v. If you are connecting for the first time, PuTTY displays a security alert dialog box that asks whether you trust the host to which you are connecting. Choose Yes. A window opens and you are connected to your instance.


[Need assistance with configuring EC2? We can help you. ]


Conclusion

This article covers the step you should follow to connect Amazon EC2 using putty.


How to Generate a PuTTY Private Key (.ppk) File ?

  • Download and install PuTTY.
  • Open the folder that PuTTY was installed to (default path is C: > Program Files > PuTTY).
  • Double-click on the file puttygen.exe.
  • In PuTTY Key Generator, click the Load button and navigate to the folder that contains the private key file (.pem) created during the EC2 configuration process.
  • Click on the PuTTY Private Key Files button in the lower-right corner of the window and select All Files (*.*).
  • Select your private key file (.pem) and click Open.
  • Click OK to close the PuTTYgen Notice pop-up window.
  • In PuTTY Key Generator, make sure Type of key to generate value is set to RSA.
  • Click Save private key and then Yes to close the PuTTYgen Warning pop-up.
  • Navigate to the location you want to store your PuTTY Private Key file (.ppk) and give it a name.
  • Click Save.
  • Close the PuTTY Key Generator window.


What is Amazon EC2 Instance?

1. Amazon EC2 instance is the varying combinations of CPU, memory, storage, and networking capacity that allow you to run your websites.

2. The best part of the Amazon EC2 instance is that it will allow you to scale your resources to the requirements of your target workload.