As an alternative to using qemu on a non-x86 computer,
you can sign up for
AWS EC2,
which gives one year of free t2.micro usage.
If you have a pre-existing AWS account and have already used up your free credits,
consider creating a new account.
Step 1: Account Creation
Create AWS account. We will be using AWS free tier - so you may need to add a credit card but it will not be charged
Use the AMI - Community AMI: ami-032c2461106e6aee3. Make sure that you're using the us-east-1 (N. Virginia) region.
Instance type: t2.micro (free tier)
Key pair: Create new, RSA, .pem, keep the resulting file 6566.pem, we’ll use it later
Network settings: 6566 SG (existing security group, created in Step 2)
Storage: 24 GB gp2 root volume (a free tier EBS Volume, do not add a new volume)
Launch instance, allow it to start up.
Step 4: Connect to Instance
ssh -i 6566.pem student@<your EC2 instance Public IPv4 DNS here> (Using the key pair from Step 3.4. You may need to chmod 0400 6566.pem the first time you use it)
It will look like ssh -i "6566.pem" student@ec2-XX-XX-XX-XX.compute-1.amazonaws.com
Before moving on to Step 5, clone and build the lab according to the "Getting Started" instructions in Lab 1. Before attempting to connect to the web server, disconnect from SSH with exit and continue to the next part.
Step 5: Connect to Webserver
Navigate to EC2, then Instance details, and note its public IPv4 address - we will use this IP address to setup SSH Port Forwarding
This is different from the previous step! It will look like XX.XX.XX.XX
(For Lab 1) Connect to the EC2 instance with port forwarding enabled by running ssh -i "6566.pem" -L 8080:localhost:8080 student@<your EC2 instance public IPV4 address here>
Now, for example, in Firefox, you can direct the browser to localhost:8080 while the SSH connection is active
(For Lab 2) The port forwarding command is instead ssh -i "6566.pem" -L 8888:10.1.0.4:8080 student@<your EC2 instance public IPV4 address here>, then you can access the site at http://localhost:8888/zoobar/index.cgi/ while the SSH connection is active
Step 6: Setup SSH profile
It might save time to encode the above SSH commands into profiles in the SSH
config file (~/.ssh/config).
Below is an example config, which uses separate profiles for whether you need
port forwarding or not.
Note that the semantics for the LocalForward option are
LocalForward <host-ip> <remote-ip>:<remote-port>.
Host 566
User student
HostName <your-ec2-address>
IdentityFile 6566.pem
Host 566fwd
User student
HostName <your-ec2-address>
IdentityFile 6566.pem
LocalForward 8888 10.1.0.4:8080