After you launch your instance, you can connect to it and use it the way that you’d use a computer sitting in front of you. The following instructions explain how to connect to your instance using PuTTY.
Prerequisites:
Before you connect to your Linux instance using PuTTY, complete the following prerequisites.
- Verify that the instance is ready
- Install PuTTY on your local computer
- Convert your private .pem key to .ppk using PuTTYgen
Convert your private .pem key to .ppk using PuTTYgen:
PuTTY does not natively support the PEM format for SSH keys. PuTTY provides a tool named PuTTYgen, which converts PEM keys to the required PPK format for PuTTY. You must convert your private key (.pem file) into this format (.ppk file) as follows in order to connect to your instance using PuTTY.
- Download PuTTYGen from puttygen.com
- Open PuTTYGen and click the Load button
- Set the filetype to *.* so the AWS PEM file is visible
- Select your PEM file and PuTTYGen will import it
- Click Save Private Key and PuTTYGen will convert the PEM to a PPK file
Connect to your Linux instance:
- Start PuTTY (from the Start menu, choose All Programs, PuTTY, PuTTY).
- In the Category pane, choose Session and complete the following fields:
- In the Host Name box, do one of the following:
- (Public DNS) To connect using your instance’s public DNS name, enter
instance-user-name
@instance-public-dns-name
. - (IPv6) Alternatively, if your instance has an IPv6 address, to connect using your instance’s IPv6 address, enter
instance-user-name
@instance-IPv6-address
.For information about how to get the user name for your instance, and the public DNS name or IPv6 address of your instance, see Get information about your instance.
- (Public DNS) To connect using your instance’s public DNS name, enter
- Ensure that the Port value is 22.
- Under Connection type, select SSH.
- In the Host Name box, do one of the following:
- Optional) You can configure PuTTY to automatically send ‘keepalive’ data at regular intervals to keep the session active. This is useful to avoid disconnecting from your instance due to session inactivity. In the Category pane, choose Connection, and then enter the required interval in the Seconds between keepalives field. For example, if your session disconnects after 10 minutes of inactivity, enter 180 to configure PuTTY to send keepalive data every 3 minutes.
- 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. - (Optional) If you plan to start this session again later, you can save the session information for future use. Under Category, choose Session, enter a name for the session in Saved Sessions, and then choose Save.
- Choose Open.
- If this is the first time you have connected to this instance, PuTTY displays a security alert dialog box that asks whether you trust the host to which you are connecting.
- (Optional) Verify that the fingerprint in the security alert dialog box matches the fingerprint that you previously obtained in (Optional) Get the instance fingerprint. If these fingerprints don’t match, someone might be attempting a “man-in-the-middle” attack. If they match, continue to the next step.
- Choose Yes. A window opens and you are connected to your instance.
Leave a comment