Accessing the EC2 Instance Connect Linux Terminal

Accessing the EC2 Instance Connect Linux Terminal

The AWS EC2 Instance Connect feature allows you to run commands on your EC2 instance remotely as if you were physically present at the server. Using the SSH protocol, you can securely transfer files between your local machine and the EC2 instance using the SCP (Secure Copy Protocol) or SFTP (SSH File Transfer Protocol) options.

  1. Select and start a server. If you haven't created a server, please refer to my article explaining the steps for launching and configuring an EC2 instance.

  1. Add the SSH protocol as an inbound rule under the server's security group under the server's security tab. Adding and configuring SSH as an inbound security group rule creates a secure, encrypted channel over an unsecured network like the Internet. This encryption ensures that malicious actors cannot intercept or eavesdrop on any data transmitted between the client (your local computer) and the server (in this case, the EC2 instance). This level of security means that sensitive information, such as passwords and commands, is kept safe from prying eyes.

  1. When the server is selected, click the "Connect" button on the upper right-hand side.

  1. You can now select the "Connect" button on the lower left-hand side to access the server's Linux terminal. To connect your instance, you'll choose the "EC2 Instance Connect" option for now.

  1. Accessing the AWS Linux terminal through the EC2 Instance Connect function is a convenient alternative to using OpenSSH for Windows or SSH for MacOS and Linux. As you can see below, you can now execute commands after being granted remote access to the server.