Run a VPS on AWS EC2

Go to AWS EC2, create a new instance, then on the Dashboard of this instance, click on Key pairs in the resources card and create a new ssh key pair. Just change format to pem:

The key will be downloaded automatically. It can now be uploaded to cloud9 environment. Just switch over to cloud9, click on File and upload, then upload the new key.

Now we need to open the 22 and 80 ports on the newly created VPS, go back to EC2, resources card and click on security groups and create a new security group with 2 inbound rules for ports 22 and 80:

Next we need to create a spot request and ensure it’s using the newly created SSH key:

activate the newly created security group to be able to ssh into the server:

We can now find the new instance under “Instances” menu point, it’s be to rename it to be able to easily identify it later, then click on connect, which will give the instruction to connect to the VPS from cloud9 shell:

Follow the instructions to connect via ssh to the server instance

Leave a comment

Your email address will not be published. Required fields are marked *