Computer Science & Computer Engineering

You will occasionally need to copy files from your computer to or from your network home directory. One way of doing this is to copy files only when needed, using scp, as outlined in this section. An alternative is to make the network directory appear just like any other directory on your computer—if you would rather follow that route, see the section on mounting a network drive.

scp stands for secure copy: "secure" because the files transmitted between your computer and the remote computer are encrypted; “copy” because you’re making a copy of the files (the file will exist on both computers—if you update one, then the other will be out-of-date).

Open a terminal (do not log in to, and navigate to the directory on your computer that contains or will contain your work.

From the selected directory, you can issue the scp command. scp takes at least two arguments: the name of the source file you want to copy followed by the destination where you want the copy to appear. Either argument can include your username and a remote computer name, indicating the direction of transfer. Remember, the file you want to copy comes first, followed by where you want the copy placed.

Suppose you want to copy a file named test.txt from your computer to First, navigate to the directory containing test.txt (i.e., you should be able to issue the ls command and see text.txt). Next, issue the scp command:

scp test.txt

Replace USERNAME with your campus usernae. That command will copy test.txt into a directory named Documents on your network home directory. Note that the Documents directory must exist for this to work.

If you wanted to copy a file named project.c to your computer from the server, then run (again, from your computer terminal, not logged in to

scp .

Assuming project/project.c exists in your network home directory, this command will copy project.c from the network project directory to your current local computer directory (identified by the ., which represents the current local directory).