๐๐ก๐๐ญ ๐๐ซ๐ ๐ญ๐ก๐ ๐ฏ๐๐ซ๐ข๐จ๐ฎ๐ฌ ๐ญ๐๐๐ก๐ง๐ข๐ช๐ฎ๐๐ฌ/๐๐ฉ๐ฉ๐ซ๐จ๐๐๐ก๐๐ฌ ๐๐จ๐ซ ๐๐จ๐ง๐ง๐๐๐ญ๐ข๐ง๐ ๐ญ๐จ ๐๐๐ ๐ข๐ง๐ฌ๐ญ๐๐ง๐๐๐ฌ?
There are several ways to connect to an Amazon EC2 instance:
๐ SSH (Secure Shell) - SSH is a secure network protocol that allows you to connect to a remote computer over an encrypted connection.
To connect to an EC2 instance using SSH, you will need a client application installed on your local computer, such as PuTTY (Windows) or Terminal (Mac).
Here are the steps to connect using SSH:
a. Obtain the EC2 instance's public IP address or DNS name.
b. Open the terminal application on your local computer.
c. Type the following command to connect to the instance:
ssh -i path/to/your/key.pem username@public-ip-address
Replace "path/to/your/key.pem" with the path to your private key file, "username" with the username you specified when launching the instance, and "public-IP-address" with the EC2 instance's public IP address.
๐ AWS Systems Manager Session Manager - AWS Systems Manager Session Manager is a fully managed service that enables you to manage your Amazon EC2 instances through an interactive one-click browser-based shell or through the AWS CLI. Here are the steps to connect using Session Manager:
a. Ensure that the instance has the AWS Systems Manager agent installed.
b. Open the AWS Management Console and navigate to the Session Manager console.
c. Choose the instance you want to connect to and click on "Start session".
d. A new browser tab will open with a terminal prompt where you can enter commands.
๐ AWS Management Console - You can connect to an EC2 instance through the AWS Management Console. Here are the steps to connect using the AWS Management Console:
a. Log in to the AWS Management Console and navigate to the EC2 Dashboard.
b. Choose the instance you want to connect to and click on "Connect".
c. Select "EC2 Instance Connect" and click on "Connect".
d. A new browser tab will open with a terminal prompt where you can enter commands.
๐ RDP (Remote Desktop Protocol) - If you are running a Windows instance, you can connect to it using RDP. Here are the steps to connect using RDP:
a. Obtain the EC2 instance's public IP address or DNS name.
b. Open the Remote Desktop Connection application on your local computer.
c. Enter the EC2 instance's public IP address or DNS name and click "Connect".
d. Enter your username and password when prompted to log in to the instance.
It's worth noting that for SSH, RDP, and Session Manager connections, you need to ensure that the EC2 instance's security group allows inbound traffic on the appropriate ports (22 for SSH, 3389 for RDP, and 443 for Session Manager). You can do this by modifying the security group's inbound rules in the EC2 console.