What is SSH/PuTTY and how to configure PuTTY in your Window’s machine

PuTTY is a free application tool used to establish secure connection between local Window's system to secure/insecure remote cloud host

There are two different ways to transfer files from local Windows machine to EC2 instance remote host.

  1. Through FTP
  2. Through SSH

What is SSH?

SSH is a secure shell network to communicate between two machines securely even in not so secure network. The most significant feature of SSH is that the communication between two computers is encrypted, which makes it suitable for use on insecure networks too.

SSH is usually used to perform preferred operations, example – implementation of SSL certificate and definitely to transfer data and files too.

SSH is usually preferred when your hosting is usually on cloud, such as Amazon AWS.

What is FTP?

FTP is Files Transfer Protocol, we generally use tools such as FileZilla to transfer files between two machines. Example – transferring files between local to remote host.

FTP client tool is the most easiest mode of file transfer. All you need to do is (1) Connect to your remote host, (2)locate required path and (3) Drag-drop files from your local machine to remote host.

OK, so this covers the basic description of SSH and FTP.

So in this tutorial we shall learn how to how to connect windows local machine to remote AWS EC2 instance.

We use Putty, an open source application tools to connect local windows machine to remote EC2 instance on AWS.

One very important element you require to establish this connection is ‘.pem’ key, which you would have downloaded while creating/launching your AWS EC2 instance. Please keep ‘.pem’ key handy before starting this procedure.

Step1: Download PuTTY files

  1. Visit https://www.putty.org/ and download Putty package (exe and putty.exe) that is relevant to your windows machine version. Our Windows machine is 64-bit and we downloaded relevant application files from the below marked links.

    Which PuTTY version to download for my Window

Step2: Convert your Key-pair from ‘.pem’ to ‘.ppk’ format

  1. Open PuTTY Key Generator Application (exe), and then click on ‘Load’ button,
  2. Find your ‘.pem’ file which was downloaded while launching your instance
  3. This procedure will convert you key-pair from ‘.pem’ to ‘.ppk’ format
  4. Allot a key name and click on ‘Save private Key’ to save the same.

Step3: Configure your PuTTY and connect to remote machine from your local machine

  1. Now go to your EC2 instance
  2. Copy your Public DNS (IPv4) value
    How to find out Public DNS in AWS EC2 instance
  3. Open putty.exe (PuTTY configuration application)
    In the ‘Host Name’, you will have to type your SSH username, which will be either “user” or ‘bitnami” or ‘ubuntu’, followed by ‘@’ and paste your copied Public DNS (IPv4) value. Which will look like – user@IPv4 value.
    How to connect to PuTTY?
    To find your SSL username – https://docs.bitnami.com/aws/faq/get-started/find-credentials/
  4. On the left column of your pop-up, select ‘SSH’ and select ‘Auth’
    Adding Key Pair in FTP as AUTH Key
  5. Click on browse button to select your ‘.ppk’ key-pair file
  6. Select ‘session’ on left column
  7. Click on ‘Open’ and the ‘Yes’
  8. And you are done. Your SSH connection is successfully established.