CS 105

How to Work on a Lab Machine

Here's how to work on a lab machine!

We're assuming that you've already done the initial setup on the server, so all you need to do is connect and start working. If you haven't, follow the steps in Getting Started.

Log in to the Lab Machine

Log in to the lab machine as “Guest”.

Log Into the Server with SSH

In CS 105, you can use whatever SSH client you like, including running ssh in a terminal window, PuTTY on Windows, or an SSH client that's part of an editor.

On lab machines, the Terminal application is /Applications/Utilities/Terminal.app. You can open it from the Finder or search for the string “terminal” using Spotlight (Command-Space).

Visual Studio Code

Another option is to use Microsoft's Visual Studio Code, an editor that includes a terminal, and is expandable with various extensions that allow it to support language-specific syntax highlighting, version-control systems like git, and lots more.

The downside of using VS Code on a lab machine is that your preferences aren't saved, so you'll need to log in to a Microsoft or GitHub account to sync your settings and extensions.

The same issue impacts any other editor or tool you use on a lab machine when logged in a guest.

Open the VS Code app. The first window that opens allows you to edit files on the hard drive of the computer you are using. On lab machines, those files are deleted when you log out, so you want to do your work on the CS 105 class server (wilkes.cs.hmc.edu) instead.

Click on the >< button in the lower-left corner of the window. In the pop-up menu, select Remote-SSH: Connect to Host... and enter username@wilkes.cs.hmc.edu for the host (where username is replaced by your CS 70 server username). When prompted, enter the password you set above.

A new “remote” window will pop up! This window is essentially running on the remote computer wilkes.cs.hmc.edu, so you can edit files stored on the server machine and run commands on the server.

  • PinkRobot speaking

    If you haven't connected through VS Code before, it might be a little bit slow at first as it initializes the remote connection. (It has to download a copy of itself to the server.)

  • BlueRobot speaking

    Connecting should be smoother once that's done!

  • Hedgehog speaking

    I need help again!

  • PinkRobot speaking

    Sure thing. See if this video showing Prof. Bang connecting to the server with VS Code helps. (Although he's using cs131.fun instead of wilkes.cs.hmc.edu, the basics are the same.)

The >< button should change to add “SSH:wilkes.cs.hmc.edu”, so you can be sure you're working in the right window. (You can close the local window, as you won't need it for anything.)

Get to Work!

You're now ready to work on your assignment! You should follow any additional directions on the assignment page in case there's any assignment-specific setup required, but you should be able to copy files back-and-forth to the server from the lab machine (or your machine) with scp or some other tool that supports sftp, or, of course, if using VS Code, you should be able to open and edit files using the native interface just like you'd do on your own machine, run commands via VS Code's terminal panes, and so on.

Or Use Your Own Machine

You might prefer to use the tools you like on your own laptop, and you're welcome to do so. Make sure you and your partner can both see your screen, and ask for help if you can't get things working.

(When logged in, completion status appears here.)