Connect Amazon Linux 2 using MobaXterm

Connect Amazon Linux 2 using MobaXterm

  1. Download MobaXterm

    create vpc for linux instance

  2. After downloading MobaXterm, extract and open it. Then, select Session.

    create vpc for linux instance

  3. In the Session settings interface, choose SSH.

    create vpc for linux instance

  4. In the Session settings interface, fill in the following details:

    • Remote host: Enter the Public IPv4 address.
    • Specify username: Enter ec2-user.
    • Use private key: Choose the path of the key pair created and downloaded during EC2 instance creation.

    create vpc for linux instance

  5. Once the connection is successful:

    create vpc for linux instance

    Note: You have two options to connect to EC2.


Connect to Amazon Linux 2 using PuTTY

To connect to an EC2 VM running Linux, you can use PuTTY on Windows. Follow these steps:

  1. Download PuTTY tools from the following links and save them to the same path where you downloaded the EC2 key pair:

  2. Connect to Amazon Linux 2 using PuTTY:

    • Launch puttygen.exe and load the private key file.
    • Select Load.

    connect linux instance

  3. Choose kp-linux.pem as the private key file for the Amazon Linux 2 instance.

    connect linux instance

  4. After successfully importing the key, save the private key after generation.

    connect linux instance

  5. Name the key file kp-linux and select Save.

    connect linux instance

  6. Go back to the EC2 interface, select the Linux-instance, and copy the Public IPv4 address.

    connect linux instance

  7. Use putty.exe to connect to the Amazon Linux 2 instance via port 22:

    • Enter the Host Name or IP address (paste the Public IPv4 address).
    • Save the session as Linux-Server and select Save.

    connect linux instance

  8. Choose SSH:

    • Select Auth.
    • Select Browse and choose the path to kp-linux.ppk.
    • Select Open.

    connect linux instance

  9. Select Accept to connect:

    connect linux instance

  10. After connecting, authenticate by entering ec2-user as the log in:

    connect linux instance

  11. Complete the connection to the Amazon Linux 2 instance:

    connect linux instance

  12. Check the connection by entering ping amazon.com -c5:

    connect linux instance