SI 486I Spring 2022 / Admin


This is the archived website of SI 486I from the Spring 2022 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

VM access

We will do our work in a protected, restricted virtual machine environment. Each of you has an assigned virtual machine just for this class. You have sudo access on your own VM, meaning that you can install software and do all kinds of wonderful things.

This page will tell you how to access your VM. Note that the VMs are available from the USNA Intranet only, so you need to be connected to that first (either on the mission network, or through the VPN).

1 Web browser (vcenter)

The simplest way to access your VM is through the VMWare interface in a web browser.

This is also the place to go if you crash your VM and need to reboot it

  1. Make sure you are on the USNA intranet
  2. Go to https://vcenter.cs.usna.edu
  3. Click on "launch vsphere client (html)"
  4. Use your standard USNA login name and password
  5. Click the box after very carefully reading the DoD terms and conditions
  6. Click through to see a scary window telling you that you can’t do anything. This is normal.
  7. Click on the second little icon thingy at the top that has some boxes and a folded corner:
  8. Expand Datacenter/si486i. You should see a VM name with your username in it.
  9. Click on that and go to "Launch web console" (big blue button).
  10. Your default password is "myvm", which you should be forced to change (to whatever you want) when you first login.

Take note of your machine's hostname, which will be an animal like "tiger" or "deer".

2 x2go client

x2go is a program that allows you to launch a virtual desktop environment on a remote computer. The client is freely available on Windows, Mac OS, or Linux.

  1. Download the x2go client on your local computer. Go to https://apt.cs.usna.edu/docs/x2go.html and follow the instructions for your OS. (Just go up to where it says "Create a new session".)
  2. Check for an email from your instructor that has two attached key files to access your VM: a private key file with a name like roche-cat-key, and a corresponding public key file with a name like roche-cat-key.pub. You need to download these and save them somewhere on your computer.
  3. Create a new session, which should open a config page.
  4. Carefully set the configuration as shown in the image below, substituting:
    • 1. This should be your machine's hostname
    • 2. Your USNA username, like m123456
    • 3. The filename where you saved your private key file from the email
    • 4. For the SSH proxy host use esxi-gw.cs.usna.edu port 4861

    Note:
  5. If you want, go back to https://apt.cs.usna.edu/docs/x2go.html and follow the rest of the instructions to set up your I/O and other settings
  6. If all is well, you should be able to log in just by selecting this session, no password required.

3 ssh (command line)

Real crypto wizards use the command line. Here's how to set up ssh so you can log in directly to a your VM without any of that GUI stuff slowing you down.

  1. Check for an email from your instructor that has two attached key files to access your VM: a private key file with a name like roche-cat-key, and a corresponding public key file with a name like roche-cat-key.pub. You need to download these and save them somewhere on your computer.
  2. Create a .ssh directory if you don't have one already:
    mkdir -p ~/.ssh
  3. Open a text editor for the file ~/.ssh/config (This might already exist, or you can create it now.)
  4. Add the following lines to the top of your ~/.ssh/config file, with the following substitutions:
    • Replace ~/keys/roche-cat-key (in two places) with the name of your private key file that you downloaded from the email.
    • Replace cat (in two places) with the hostname of your VM
    Host goatgate
      HostName esxi-gw.cs.usna.edu
      Port 4861
      IdentityFile ~/keys/roche-cat-key
    Host cat
      ProxyCommand ssh goatgate "nc cat %p"
      IdentityFile ~/keys/roche-cat-key
      ForwardX11 yes
  5. Now you should be able to run ssh your_vm_hostname to login, no password required!