COMP30023 Week 01 – Prelab
School of Computing and Information Systems
COMP30023: Computer Systems
Copyright By PowCoder代写 加微信 powcoder
Week 01 – Prelab Part 1
1 Introduction
As part of this course, you will be provided a personal Linux virtual machine instance on Melbourne
University Cloud. The Melbourne Research Cloud offers free on-demand computing resources to re-
searchers at the University of Melbourne (and affiliated institutions). It provides similar functionality to
commercial cloud providers such as Amazon Web Services (AWS), Microsoft Azure and Google Cloud
Platform (GCP).
You will use this Linux virtual machine to complete lab exercises and projects. The project submissions
will be tested in this Linux environment, and so it is important that you test your code on your VM; in
the past, students have lost many marks by testing only on their own computers and not in the course
environment.
Your VM allocation (i.e. IP address) will be provided to you via assignment feedback (comment section)
on Canvas once your key has been successfully harvested. For security reasons, password-based authen-
tication will be restricted. Access to the virtual machine will be through SSH key-based authentication.
If you are accessing the VM via the internet or outside the University network, you will need to connect
to the University network via VPN to access your Linux Virtual Machine. Further instructions as to
how to access this machine will be provided in subsequent lab exercises.
Task In this prelab you will create a SSH key pair. A key pair has a public key and a private key. You
need to submit the public key you create so that we can set up access to a virtual machine for you. You
will then be able to authenticate with your virtual machine using your private key.
You **should** complete this prelab by the end of week 1.
2 Generating SSH Key Pair
You may use either a *nix based Operating System (e.g. Mac OS, Linux, WSL, *BSD) (Section 2.1) or
Windows (Section 2.2) to generate the key pair.
2.1 Generating SSH Key Pair on *nix
Once you are running on *nix, the key pair can be generated by the steps in below:
1. Use the command $ ssh-keygen -t ed25519 . Then you will need to do the following:
• Specify the file name to store the keys as ⟨student_username⟩_key , (e.g., stevent2_key )
• Choose whether you want to protect the private key with a passphrase or not. You can make
your own decision based on security vs usability.
The above command will generate the keys to file:
• ~/⟨student_username⟩_key (private key), and
• ~/⟨student_username⟩_key.pub (public key).
If you are using the university linux servers, you may need to copy the key files from the server to
your local computer by scp command (see here1 for the instructions and examples).
2. View the public key using the cat command ( $ cat ~/⟨student_username⟩_key.pub )
3. Copy the text that is shown. The text commonly starts with ‘ssh-’, and ends with ‘user-
4. Continue on with instructions in Section 3 to submit your key.
2.2 Generating SSH Key Pair on Windows
1. If you are on a lab machine or do not have access to Windows 10 (or above) on your PC, follow
instructions in Section 2.3 instead. If you prefer WSL, follow instructions in Section 2.1.
2. Open either cmd or powershell . They may be launched from Run (WinKey+R) or opened from
the start menu.
(a) Use the command ssh-keygen -t ed25519 . Then you will need to do the following:
• Specify the file name to store the keys as ⟨student_username⟩_key , (e.g.,
stevent2_key )
• Choose whether you want to protect the private key with a passphrase or not. You can
make your own decision based on security vs usability.
The above command will generate the keys to file:
• C:\Users\⟨username⟩\⟨student_username⟩_key (private key), and
• C:\Users\⟨username⟩\⟨student_username⟩_key.pub (public key),
If the output of the command is “’ssh-keygen’ is not recognized as an internal or external
command”, your version of Windows is outdated or does not have the SSH Client feature
enabled. Enable the feature or proceed with instructions in Section 2.3 instead.
(b) View the public key using the type command ( type ⟨student_username⟩_key.pub ).
(c) Copy the text that is shown. The text commonly starts with ‘ssh-’, and ends with ‘user-
(d) Continue on with instructions in Section 3 to submit your key.
2.3 Generating SSH Key Pair on dimefox
If you are NOT running on *nix, but you want to have a try on generating key pair on *nix, then you
can first connect to the university linux servers by the following two steps. Note that if you are running
on *nix, it is not necessary to connect to the linux servers.
1. If you are not using the university network, you may need to use a VPN (see here2 for the instruc-
tions of how to use VPN).
2. Gain access to a terminal or use a program like Putty.
3. Log in to the university servers via commands $ ssh
or $ ssh (The “$” represents the command line
prompt. Do not type it in.).
4. Continue on with instructions in Section 2.1.
1https://kb.iu.edu/d/agye
2https://studentit.unimelb.edu.au/findconnect/vpn
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
https://kb.iu.edu/d/agye
https://studentit.unimelb.edu.au/findconnect/vpn
3 Submitting the key
Further instructions for submitting your public key are listed on the Assignments, VM access page of
1. You can ask for help on the discussion forum/Piazza on the LMS. Read all the threads to ensure
that the question you are asking has not been asked previously.
2. Access to the virtual machines will be through your private key. Therefore, do not lose it! The
teaching team will be unable to recover the private key for you. You should make a secure backup
of the key. If you don’t know how, contact your demonstrator to discuss some potential backup
3. Do not share your private key with anyone.
4. The teaching staff will have access to all student virtual machines. Therefore it is not advisable to
store any personal information on them.
5. Do not use your virtual machines for illicit activities (e.g. denial of service attacks, copyright
infringement activities, harassment, and more). Use of this service is governed by the University’s
general regulations for IT resources: https://policy.unimelb.edu.au/category/Facilities%
20and%20IT.
6. Please make sure that you keep regular backups of your work using the git version control system
or other measures (e.g. rsync).
You should have access to https://gitlab.eng.unimelb.edu.au for hosting remote git reposi-
tories after the successful completion of the ‘Gitlab Access’ task (released at end of week 1). We
will cover git (and Gitlab) in the upcoming classes.
https://policy.unimelb.edu.au/category/Facilities%20and%20IT
https://policy.unimelb.edu.au/category/Facilities%20and%20IT
Introduction
Generating SSH Key Pair
Generating SSH Key Pair on *nix
Generating SSH Key Pair on Windows
Generating SSH Key Pair on dimefox
Submitting the key
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com