Connecting to AWS EC2 instance using Putty as SSH client- The Why?s

 In the previous article we learnt how to create instances and connect to them via AWS's own feature known as EC2 instance connect. It provides a console where we can interact and perform tasks. I have clearly explained why we are doing this in the article (linked above). Basically we are creating EC2 instances which act as virtual servers whose physical servers are located in Regions (a physical location around the world where AWS cluster data centers). Hence, being immensely cost efficient way to re-create the functionality of a dedicated physical server. 

As we require to perform tasks in the instances, we require a command line interface (CLI) to interact. The connection to a CLI is provided by various options such as EC2 instance connect (linked above), session manager (another AWS service), SSH client (here, Putty) and EC2 serial console (another AWS feature). 

We'll be discussing connecting to EC2 instance using SSH client. So now the questions will be ringing:

  • What is SSH?
  • What is puTTY?
  • Why are we using puTTY specifically?
Before going in detail, we'll learn about why these terms came into use in the first place. The "Why?s".

As we know that, EC2 instances are virtual servers whose physical servers are elsewhere. We are trying to use these servers by connecting to them. This concept is known as Remote Desktop Protocol (RDP). Remote Desktop Protocol (RDP) is a way to access and control a computer over a network. RDP establishes a dedicated, encrypted network connection between the host system (here, EC2 instance) and the remote device (our PC). 



A remote desktop is a technology that allows users to connect to a specific computer from a remote location (here, EC2 instance) as if they were sitting in front of it (our PC). Once the connection is established, users can perform a wide range of tasks as if they are actually using the computer in person. They can manage apps, fix issues, and even perform administrative tasks if they wish to do so. For example, customer support centers extensively use this feature to provide support/fix the problem by accessing the PC (where the problem pertains) from their PC. 

Even though it was a lifesaver for troubleshooting without travelling and remote login from anywhere, it has it's drawbacks. It is not a very secure. Hence, making the host and the client susceptible to cyberattacks. This is where we encounter our first question:
  • What is SSH?


The SSH protocol (also referred to as Secure Shell) is a method for secure remote login from one computer to another. SSH relies on the client/server authentication model and replaces traditional credentials with public and private keys, which work respectively as a lock and the key used to access it. Generally, private SSH keys are stored on systems, while public keys remain on servers. SSH provides more security to the authentication process than a username associated with a default password. 



In short, SSH provides a secure connection between the host and remote servers, which leads to our second question:
  • What is puTTY?

 Secure Shell (SSH) is a client/server network application. It is used as a communication vehicle between the host system (for example, a laptop computer. Here, EC2 instance) and the system command-line interface (here, CLI on our PC). An SSH client is a program that allows establishing secure and authenticated SSH connections to SSH servers (here, EC2 instance). PuTTY is one of the best SSH clients and a free implementation of SSH, which leads to our final question:
  • Why are we using puTTY specifically?
In all major versions of Linux, SSH is built into the command line and easy to access that way. So, we connect to SSH by opening the terminal and type in commands. Though you can invoke SSH from the command line in Windows, SSH access can be setup in Windows 10 PowerShell. From menu options being hidden, being able to save only a limited number IP addresses to its lack of features, along with requiring a few more clicks to load up, PuTTY is preferred. It is a free GUI app, having a configurable appearance and better features which makes connecting easy. Either way, Windows 10 has two good options for SSH.

We have come to the end of the article. We covered what SSH, remote desktops and puTTY means and how they are useful. In the next article, we'll be dealing with "How?" to connect to instance using puTTY. A disclaimer, this is an attempt to summarize multiple terminologies for better understanding. Feel free to let me know your suggestions. 


A great hack for lazy gooses like me! Tata!

Comments

Popular posts from this blog

Version Control Systems (VCS)

Linux commands - Part II - How?