Connecting EC2 instances

Connect EC2 instance

  1. Use MobaXterm to SSH into the instance via port 22.

    • Select Session

Connect EC2 instance

  1. In the Session settings section,

    • Remote host, enter Public IPv4 address of the instance
    • Specify username, enter ec2-user
    • Check port 22
    • Select Advanced SSH settings
    • Select Use private key and select keypair of the instance.
    • Select OK

Connect EC2 instance

  1. Follow the instructions in the figure. EC2 instance connection was successful.

Connect EC2 instance

Connect EC2 instance

Connect EC2 instance

  1. Install node version manager (nvm) ) by typing the following in the following command line:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

Connect EC2 instance

  1. Enable nvm by typing the following in the command line and Use nvm to install the latest version of Node.js by typing the following in the command line.
. ~/.nvm/nvm.sh
nvm install 16

Connect EC2 instance

  1. Check nodejs is installed successfully
node -v
npm -v

Connect EC2 instance