1. Connectivity test
ping ec2-13-246-240-162.af-south-1.compute.amazonaws.com
  1. SSH in the EC2 instance
ssh -i /path/to/your-key.pem [email protected]

Windows (using PuTTY):

  1. Convert the .pem file to .ppk using PuTTYgen.
  2. Open PuTTY, enter the EC2 instance DNS in "Host Name," load the .ppk file, and connect.

For Ubuntu instances, the default username is ubuntu instead of ec2-user

3. RDP into the EC2 Instance (Windows Instances)

For a Windows-based EC2 instance, you can use Remote Desktop Protocol (RDP):

  1. Open Remote Desktop Connection (on Windows) or an RDP client (Mac/Linux).
  2. Enter the public IP or DNS of the instance.
  3. Use the password generated from the EC2 console when you launched the instance to connect.

4. Test Web Services

If you're hosting a web server (e.g., Apache, Nginx, Node.js), you can access the instance via a web browser:

  1. Open a web browser.

  2. Enter the public DNS or IP:If the web server is running and security group rules allow HTTP (port 80) or HTTPS (port 443), the website or API hosted should load.

    
    <http://ec2-13-246-240-162.af-south-1.compute.amazonaws.com>
    

5. Check Open Ports