CS 367 SSH/SCP

USING SSH/SCP

Note: this information was written with Mac users in mind, however, users of other platforms may also find it useful.

Copying | Connecting     Related Pages: CS Computer Labs | Remote Access

Copying to/from Your Computer and a CS Lab Computer

Open a terminal window on your computer (don't ssh into the CS lab computers). Use secure copy on the command line:

scp <source_of_file_to_be_copied> <destination_folder>

The first argument (<source_of_file_to_be_copied>) is where your file is currently located on your computer. The second argument (<destination_folder>) is the destination and should be an existing folder.

Example: scp Desktop/h1.pdf bbadger@best-linux.cs.wisc.edu:/u/b/b/bbadger/private/ In the example above, the file "h1.txt" is being copied from the desktop of a personal computer to the private CS directory of a person with the CS account "bbadger".  The general format for getting to your personal CS directory is /u/<first_letter_of_CS_account>/<second_letter_of_CS_account>/<CS_account>/ To submit your work, replace the destination folder above with the path to your handin directory.

Note the slash (/) at end is important so that the source file is copied into the destination folder (as a file with the same name as the file on your computer) and not copied as a file with a new name (into a folder you don't intend it to go).

Remotely Connecting to a CS Lab Computer to Verify Your Submission

  1. Open a terminal window on your computer and enter:

    ssh <username>@best-linux.cs.wisc.edu

    where <username> is replaced with your CS account name.

  2. You may be prompted about something, just type in yes to add as a default.

  3. You will be prompted for your CS account password. (Your password will not show up as you type it.) Press enter and you are logged in.

  4. You can now enter Linux commands to verify your submission and/or work on the remote machine.

  5. To logout, just type in "logout" on the command line.