Connecting EC2 instances
Connect EC2 instance
-
Use MobaXterm to SSH into the instance via port 22.
-
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
- Follow the instructions in the figure. EC2 instance connection was successful.
- 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
- 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
- Check nodejs is installed successfully
node -v
npm -v