When submitting assignments from outside the Prism lab, you may use EECS Web Submit. However, sometimes, a course requires you to submit via command line submit. For example, if your course uses an automated checking system to check your submitted work, this function is not yet compatible with web submit. In this case, you will have to transfer your files to an EECS server, then login remotely, and use the command line submit tool.
Windows does not provide an easy-to-use method for transferring files or for remotely logging in to a UNIX workstation. You will need to download and install software to provide these services.
Download and install WinSCP. WinSCP is an open source free program that supports secure file transfer between two Internet connected computers.
Download and install putty (at the bottom of the linked page; it is easiest to use the PuTTY Installation package). putty is an open source free program that supports secure remote login to a host computer (among other things).
Remote login to the EECS undergraduate server and create a directory for your submission files if you have not already done so in the past. Do this by running the putty program that you installed in Step 2. In the Host Name (or IP address) field enter the EECS undergraduate server name red.eecs.yorku.ca and then click the Open button
You may get a warning window stating “The server's host key is not cached in the registry.” This is to be expected if this is the first time that you have logged into red.eecs.yorku.ca using putty. Click the Yes button to continue.
You should see a login terminal appear.
Type your EECS user name and press Enter. Type your EECS password and press Enter; your password will not appear as you type it.
To keep things organized, make a directory named submit and change to the newly created directory by typing the commands:
mkdir submit cd submit
Do not close putty; you still need it to run the submit command.
Transfer your files from your computer to the EECS undergraduate server. Do this by running the WinSCP program that you installed in Step 1. Enter the EECS undergraduate server name red.eecs.yorku.ca as the Host name, type in your EECS user name and password, and press the Login button.
You may get a warning window stating “The server's host key was not found in the cache.” This is to be expected if this is the first time that you have logged into red.eecs.yorku.ca using WinSCP. Click the Yes button to continue.
When you successfully login, you should see the WinSCP program running as shown in the figure below. The left pane shows the file system of your computer, and the right pane shows the file system of the EECS undergraduate server.
In the left pane, navigate to the folder containing your submission files using the Open directory/bookmark button. For eclipse users, you can find the folder holding your files using eclipse (in eclipse, open one of your submission files, click the File menu and select Properties).
In the figure below, you can see that I have successfully found the files that I want to submit in the left pane.
In the right pane, navigate to your submit directory that you created in Step 7.
In the left pane, select the files that you want to submit. In the figure below, you can see that I have selected three files to submit. Click the Upload button (highlighted in red in the figure below) to upload your files.
When the upload is finished, you will see your files appear in your account on the EECS server in the right pane.
In putty verify that your files have been successfully uploaded by listing the contents of the directory:
ls
In putty, type in the submit command given to you by your instructor. For example, to submit lab1 for EECS2030 you might type:
submit 2030 lab1 Point2.java SpiroUtil.java group.txt
Read the output of the submit command carefully. If there are errors with your submission you may be forced to re-submit your corrected work.
You may re-submit your work as many times as you like. Every time you make changes to your work on your computer, you must re-transfer your work using WinSCP and re-submit by typing in the submit command in putty.
Mac OS provides a terminal program much like the terminal program that you use in the Prism labs. You can transfer your files and submit using the Mac terminal.
In Launchpad, search for the terminal program, and start the terminal program. You will use this terminal to access files on your EECS account by logging into the EECS undergraduate server computer.
ssh (short for secure shell) is a program for logging into a remote computer and for executing commands on a remote computer.
Remotely log in to your EECS account using ssh by typing the following command and pressing enter:
ssh your_eecs_username@red.eecs.yorku.ca
You should replace your_eecs_username
with your actual EECS user name. For example, if I wanted to remotely log in to my account I would type:
ssh burton@red.eecs.yorku.ca
If this is the first time that you have remotely logged in to the server, you will receive a warning message. Type yes
and press enter to continue:
Enter your password and press enter (your password will not appear as your type):
You are now logged in to your EECS account. Notice that the prompt in your terminal has changed to red which is the name of the EECS server computer that you are currently logged in to.
To keep things organized in your EECS account, you should create a directory for your submission files. Type in the following commands, pressing enter after each command (if you haven't already done this in the past):
mkdir submit cd submit
This will create a directory named submit
in your home directory of your EECS account, and then change to the newly created directory.
Open a second terminal window (click on the Shell menu and click on New Window). You will use this terminal to access files on your computer.
Find the directory where your submission files are located. For eclipse users, you can find the directory holding your files using eclipse (in eclipse, open one of your submission files, click the File menu and select Properties).
Change to the directory on your computer where your submission files are located. For example, my files are located in the directory workspace/EECS2030/src/eecs2030/lab1
. To change to that directory I would type the following command into the terminal and press enter:
cd workspace/EECS2030/src/eecs2030/lab1
List the contents of the directory by typing the following command into the terminal and press enter:
ls
Transfer your files to your submit
directory on the EECS undergraduate server. If you want to transfer all of the files in the directory use the following command:
scp * your_eecs_username@red.eecs.yorku.ca:submit
Again, replace your_eecs_username
with your actual EECS user name.
If you want to transfer specific files you can do so by transferring them one at a time; for example, I could transfer all three files individually by typing:
scp Point2.java burton@red.eecs.yorku.ca:submit scp SpiroUtil.java burton@red.eecs.yorku.ca:submit scp group.txt burton@red.eecs.yorku.ca:submit
scp will prompt you for your EECS password; type it in and press enter.
scp will transfer a copy of your files from your computer to your EECS account.
Switch back to the first terminal window that you opened (the terminal where you are currently logged into red).
Make sure that your files have been transferred into your submit
directory by typing the following command and press enter:
ls
Submit your files using the command provided by your instructor.
For example, to submit lab1 for EECS2030 you might type:
submit 2030 lab1 Point2.java SpiroUtil.java group.txt
Read the output of the submit command carefully. If there are errors with your submission you may be forced to re-submit your corrected work.
You may re-submit your work as many times as you like. Every time you make changes to your work on your computer, you must re-transfer your work using scp
(using a terminal window on your computer) and re-submit by typing in the submit command (using a terminal window where you are logged into red).
Your remote login session ends automatically if you don't enter any commands for a certain period of time. If this happens, you will see a message that mentions a broken pipe
and your terminal prompt will show the name of your computer (indicating that you are no longer remotely logged into red). If this happens,
run the ssh program again to log back into red.