Operating Systems Concepts & Design
Make sure to return to the AWS Learner Lab page (link in Pilot if you forgot to bookmark it) and hit “Start Lab” to turn on your sandbox / AWS instance.
Use ssh to connect to your AWS Ubuntu instance.
Go to the folder that contains your repository (likely named ceg2350-yourgithubusername).
Create a new directory, Lab11.
Create a file named README.md in the Lab11 folder. The Lab 11 Template can be copied from this link:
https://raw.githubusercontent.com/pattonsgirl/CEG2350/refs/heads/main/docs/Labs/Lab11/LabTemplate.mdYou may refer to additional resources outside of the recommended resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
Determine and create one or more GitHub Issues for this lab.
Determine and create one or more branches to resolve the Issues for this lab.
In the end, your lab submission (README.md) should be visible on the main branch.
With the semester wrapping up, it’s time to prepare to lose access to your instances. Identify folders of work on your AWS instance you would like to save. If you have none, use the folder that contains your local copy of your GitHub repository. While using GitHub to save work is an option, it is just as common to need to compress and transfer information. It is not required, but is interesting to look the the size of these folders pre and post compression
Do the following on your AWS instance.
Useful commands: tar, gzip, file
tar command, fill in the table describing the most frequently used flags:| tar Option | Description |
|---|---|
-c |
|
-v |
|
-f |
|
-z |
|
-x |
|
-t |
tar and compress folders of your choice using gzip compression. Write the command you used.Do NOT add and commit your tar and compressed file to GitHub. It does not need to be in your repository folder and may in fact be too large to push to GitHub.
tar and compressed file is a tar and compressed file. Just stating it has a .tar.gz extension will not be sufficient for credit.Resources
sftp command, fill in the table describing the most frequently used commands within the program:| sftp Command | Description |
|---|---|
ls |
|
lls |
|
cd |
|
lcd |
|
pwd |
|
lpwd |
|
put |
|
get |
|
exit / bye |
Confirm you are on your local system using the terminal you normally use to ssh to your instance. Do not ssh to your instance
sftp.tar and compressed file (ending with .tar.gz) from your AWS instance and download it to your local system.tar.gz) to a folder on your system
Resources
For this part, you will be installing an open source web server to your AWS instance, extracting a compressed archive containing a static website, and testing that it works!
Do the following on your AWS instance.
apt, systemctl, wget, chown, chmod, tar, vim, curlapache2 or nginx with aptsimple-site.tar.gz to your AWS instance
/var/www/html:
/var/www/html folder - the owner can read, edit, and view (execute) the directory; members of the group can read, edit, and view (execute) the directory; others on the system can only read and view (execute) the directory./var/www/htmlindex.html file in /var/www/html with:
YOUR LAST NAME HERE is. Make this div visibleInsert something fun here with a fact about you<section>
<h2>CEG 2350 Lab 11</h2>
<div style="display:none">YOUR NAME HERE</div>
<h3>Facts about me</h3>
<p>Insert something fun here</p>
</section>
When you use ssh, you specify a hostname after the @ sign. Typically a hostname is a pretty name the associates with the IP address of the server. We do not have a pretty name set up for your AWS instances, so the only way to address them is by their public IP address (as you’ve been doing all semester).
http:// in front of your AWS instance’s public IP. We’ll talk about it later.index.html and aren’t seeing your changes in your browser, try to use your browsers hard reload, often ctrl+shift+r or ctrl+f5. This will get the actual file from the server and ensure its not an old cached version.Resources
ssh keysWithout practice, ssh connections and authentication just seem like magic. Really, it is all about files and information being in the right spot as defined in rules in configuration files. The goal of this part is to practice where keys go when you have a new ssh keypair. This is a common task to do when you gain access to a system - put your public key in the authorized_keys file in the .ssh folder of your remote account, then connect from your system to the remote system’s account.
When you see a reference to local system, this means your system - not your AWS instance
adduser, getent passwd <username>, ssh-keygen, vim, sshssh files:| ssh File Path / Name | Purpose |
|---|---|
~/.ssh/config |
|
~/.ssh/id_rsa |
|
~/.ssh/id_rsa.pub |
|
~/.ssh/id_ed25519 |
|
~/.ssh/id_ed25519.pub |
|
~/.ssh/authorized_keys |
|
~/.ssh/known_hosts |
config file for ssh:| ssh config Option | Description |
|---|---|
Host |
|
HostName |
|
User |
|
Port |
|
IdentityFile |
firstinitiallastname account~/.ssh/authorized_keys file on the AWS instancessh in to the AWS instance using the user’s username and the private key of the keypair you created.
ssh -i path/to/privatekey username@hostname_or_ip~/.ssh/config file with the new connection information.ssh command that will use your config file information if correctly entered.Resources
Verify that your GitHub repo has a Lab11 folder with at minimum:
README.mdIn the Pilot Dropbox, paste the URL to the Lab11 folder in your GitHub repo
Your files should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.