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:
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.
cs-ssh.calvin.edu
smn4
22
/home/cs/108/current/
and then your login id (e.g. smn4
).That's it! You have now submitted your work!
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:
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
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.
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).
cs-ssh.calvin.edu
smn4
,
or abc50
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:
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.
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:
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!):
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.
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
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.