Many times the software that we use in our courses at Calvin is available for free. The first step to working remotely is to install the necessary software packages on your local machine (i.e. your laptop or desktop).

For example, for CS108 you can follow the instructions from Prerequisites

Once you have installed the appropriate software packages, you can work on your local machine in much the same way you did in lab. You open the program from your "Program Files" or "Applications" menu (wherever you chose to install), and then save your work to a folder on your local machine. I highly recommend that you create a folder for each of your computer sciences classes, something like "cs108", and then save all of your work in this one folder for easy retrieval.

Using these steps, you can complete your lab, homework and project assignments using your personal laptop or desktop. However, in order to get credit for the assignment, you must get your code files from your personal machine, to the CS department machines in SB 354. One way to do this would be to copy your work from the folder on your laptop or desktop machine to a thumb drive, walk the thumb drive up to the third floor of science building, and transfer the files from the thumb drive to the turnin directory.

But I understand that some days the third floor of science building is just too far away, so below are instructions for submitting your files directly from your personal machine to the turnin directory, without having to leave your room. The instructions change slightly depending on if you are working on campus or off (and there are extra required steps if you are working off campus!) so be sure to follow the appropriate version of the instructions.

Whether on campus or off, using Windows, Mac OSX or Linux, you will need file transfer software. FileZilla is one such application, which has the advantage of having a graphical user interface (instead of only allowing commands like we have used with a terminal window):

After downloading and installing FileZilla, follow the appropriate instructions below:

Submitting from On Campus

Follow the instructions here to create a connection between your local machine and a machine named "cs-ssh.calvin.edu" that is a part of the CS department network.

  1. Open the FileZilla application (downloaded and installed above).
  2. There are four boxes near the top of the screen. Fill them as follows:
  3. Now click the "Quickconnect" button. The topmost window should show a log file of sorts that shows that your connection was established, and the right-hand side of the screen should now be populated with folders and files from your account in the unix lab.
  4. Actually Submitting: To submit your work, browse in the right panel to: /home/cs/108/current/ and then your login id (e.g. smn4).
  5. In the left hand panel, browse to your cs108 directory on your personal machine.
  6. Assuming you have followed the course directions, and saved your code in a folder named appropriately (something like "lab04" or "homework03"), drag the assignment folder you wish to submit from the left panel to the right panel.

That's it! You have now submitted your work!

Submitting from Off Campus using Windows

For security purposes, the only way to access the SB354 machines from off campus is by using a public/private key pair. You must generate this pair on the remote machine, and then transfer the public key to the machine at Calvin.

There are several software packages that are available to generate keys and use them for remote access on Windows. Several of our students have had good results using Bitvise so that is what I will use in the instructions below:

  1. Download and install Bitvise, available here: http://www.bitvise.com/download-area. Be sure to download the Client (Tunnelier).
  2. If bitvise is not already running, start the application.
  3. Before you can make a connection with a calvin machine, you need to generate the public/private key pair. Do this as follows:
    1. Verify that you are on the Login tab (this is the default when bitvise is opened)
    2. On the right side of the screen there is a box that says "Authentication" and within this there is a link for "Client key manager". Click on this link.
    3. In the box that appears (titled "Bitvise Global Keypair Management"), near the bottom, click on "Generate New..."
    4. In the box that appears (titled "Generate New Keypair") verify that the slot is non-zero (probably 1), that the algorithm is "ssh-rsa" and the size is "2048 bits" (more bits would be ok, but don't use fewer).
    5. For additional security (your housemate also uses your computer for example), enter and confirm a passphrase.
    6. Click "Generate".
    7. There should now be a new line in the "Bitvise Global Keypair Management" window corresponding to the keypair you just generated. Click on the new keypair line (anywhere on the line is fine), and then choose "Export..."
    8. In the box that appears (titled "Export Public or Private Key") select "Export public key" and "OpenSSH" format.
    9. Click "Export" and put the key somewhere you can easily find it (Documents? Desktop?? this depends on your personal filing system). Save the file with the name "publicKey"

OK, you now have a public/private key pair. The next step is to put the public key on the cs filesystem. The steps that follow will walk you through this process, or you can follow along with this video https://www.youtube.com/watch?v=Tc5eqvlRSF8

  1. Use a web browser to go to https://freeipa1.cs.calvin.edu
  2. Enter your credentials up in the lab to login
  3. On the right hand side of the screen, under "Account Settings" there is "SSH public keys". Click "Add"
  4. Copy and paste the entire contents of your public key file into the window that appears, and then click "Set".
  5. Scroll back to the top of the page, and find and click the "Update" button to permanently save your SSH key.

You have now added your key to the cs file system, and can use it to connect to cs-ssh.calvin.edu from off campus. To transfer files, you can either configure FileZilla to use your keys, or you can continue to use BitVise.

Submitting from Off Campus using BitVise

  1. Open the bitvise client application.
  2. In the "Authentication" pane, choose "publickey - slot 1" as the initial method, and then populate the username with your calvin user name (something like smn4) and the key passphrase if required (this will be the passphrase you selected when creating the key pair)
  3. In the "Server" pane, type in the Host cs-ssh.calvin.edu and verify that the Port is 22.
  4. At the bottom of the screen, click "Login".
  5. In the window that appears, select "Accept and Save" (you will only have to do this step the first time you use your keys).

You are now connected. Two windows should appear: a terminal, very much like the one available in the lab, and another window with two panels. In the paneled window, the left panel (labeled "Local Files") is all of the files on your local machine, while the right panel (labeled "Remote Files") are the files in SB 354. To submit your work, simply drag the relevant folder from its location in your Local Files to the turnin directory on the Remote Files. NOTE: You can find your turnin folder in the Remote File panel by typing in the address bar the turnin directory (e.g. for CS 108: /home/cs/108/current/ and then clicking on your username).

Submitting from Off Campus using FileZilla

  1. Start the FileZilla application.
  2. In the upper left hand corner of the screen (right above the word "Host:"), click on the icon to "Open the Site Manager" (you can also do this by choosing "File"->"Site Manager...")
  3. At the bottom of the screen that appears, choose "New Site"
  4. Give the site a name (something like "Calvin CS")
  5. On the right hand side of the screen fill in the following values:
  6. Back on the site manager screen, click "OK".

Now that you have configured FileZilla (which you will only have to do the first time), you can use it to transfer files just like you are on campus, assuming you connect using your keys. Do this as follows:

  1. If you haven't already, start FileZilla
  2. Choose "File"->"Site Manager..."
  3. In the screen that appears, click on the site you created (hopefully named something like "Calvin CS")
  4. Click "Connect" at the bottom of the screen

If this is the first time you are connecting to cs-ssh, you may get a warning about an "Unknown host key". Click the box to "Always trust this host, add this key to the cache", and then click "OK". If everything was correctly set up, you should now see the department file system appear on the right hand side of the FileZilla window, and you can drag folders between your system and the lab system as described in the on-campus instructions.

Submitting from Off Campus using Mac OSX or Linux

First, a caveat: I assume there are analogous instructions for Linux, but what is written here is specific to Mac OSX. Please let me know if you have better instructions for Linux and I will happily post them!

We first need to make sure that the necessary tools are installed:

  1. Begin by installing XCode from the App Store (this may take a while, depending on your network connection)
  2. Open XCode, and choose "XCode"->"Preferences"
  3. Click on the tab for "Downloads"
  4. Click the button to install "Command Line Tools"

Once the command line tools are installed, you can close the App Store and XCode. Instead, open a terminal window (Finder - Applications - Utilities - Terminal). The remainder of our work will be done here.

For security purposes, the only way to access the SB354 machines remotely is by using a public/private key pair. You must generate this pair on the remote machine, and then transfer the public key to the machine at Calvin.

Follow these steps to set up your public/private key pair (reminder, all of these commands are given in the terminal window!):

  1. Run ssh-keygen and follow the prompts. It is easiest to use an empty passphrase, though more secure to provide one. This will create a folder called .ssh in your home directory, and will put two files id_rsa and id_rsa.pub within the folder.
  2. Copy the public key file id_rsa.pub to your Desktop (this is necessary because file browsers generally ignore folders beginning with a dot). You can use this command: cp .ssh/id_rsa.pub Desktop/

OK, you now have a public/private key pair. The next step is to put the public key on the cs filesystem. The steps that follow will walk you through this process, or you can follow along with this video https://www.youtube.com/watch?v=Tc5eqvlRSF8

  1. Use a web browser to go to https://freeipa1.cs.calvin.edu
  2. Enter your credentials up in the lab to login
  3. On the right hand side of the screen, under "Account Settings" there is "SSH public keys". Click "Add"
  4. Copy and paste the entire contents of your public key file into the window that appears, and then click "Set".

At this point, you could submit your work using a secure version of the same commands you use to submit in the unix lab. Alternatively, you can use FileZilla if you prefer a graphical interface. (The FileZilla instructions are above.) To use the terminal, begin by using cd to change directory to the location of your code (hopefully something like ~/cs108/workspace/cs108/src ) and then submit using:
scp -r lab03 smn4@cs-ssh.calvin.edu:/home/cs/108/current/smn4/
where smn4 is replaced in each case with your login id for the unix lab, and lab03 is replaced with the appropriate assignment name. At this point, assuming you received no errors from the scp command, you will have successfully submitted your assignment.