Lecture # 23 - Secure Shell (SSH)
What is SSH? Why is SSH used? SSH connection from Windows to AWS EC2 Instance
SSH:
SSH stands for Secure Shell. It is a cryptographic network protocol that provides a secure way to access and manage remote devices or servers over an unsecured network, such as the internet. SSH encrypts data transmitted between the client and server, ensuring confidentiality and integrity of the communication.
Uses of SSH:
Remote Login:
Users can log in to a remote device (such as a server or a network router) securely over SSH. Once authenticated, users can access the remote device's command-line interface or execute commands remotely as if they were physically present at the device.
Secure File Transfer:
SSH includes utilities like SCP (Secure Copy) and SFTP (SSH File Transfer Protocol) for securely transferring files between devices. These utilities provide a secure alternative to traditional file transfer protocols like FTP.
Remote Command Execution:
Administrators can execute commands on remote devices securely using SSH. This feature is useful for tasks such as system administration, configuration management, and troubleshooting across multiple devices.
Tunneling:
SSH supports port forwarding and tunneling, allowing users to securely access services running on remote devices as if they were local. This feature is commonly used to bypass firewall restrictions, access internal network resources securely, or encrypt other network protocols.
Secure Communication:
SSH encrypts all communication between the client and server, including passwords, session data, and transmitted files. This encryption helps protect against eavesdropping and tampering by malicious actors.
A simple SSH Connection from Windows to AWS EC2 Instance:
Follow these steps to connect your Windows to the AWS EC2 Instance:
Make sure you have an EC2 instance on AWS. If you don't know how to create an EC2 instance view this.
Also make sure you know the path where the key of the instance is saved.
Select your instance and click on connect.
-
A new window will be opened. Click on SSH client.
-
Copy the command that is selected in the picture.
-
Now go to the location where the SSH key-pair of the instance is saved. Click on the location bar. Write cmd and press enter. A command prompt will be opened.
-
paste the command that was copied and press enter.
-
Write yes and press enter key.
-
Now I'm accessing EC2 instance from windows.
-
Here is my EC2 instance.
-
I made a directory from windows.
-
Lets see on AWS.
-
This is how we established a SSH connection between windows and our AWS EC2 instance.