Uploading Files With Secure Copy (SCP)

Note: This is an advanced technique that requires a certain degree of comfort with command-line interfaces.

A program called SCP is available as part of most SSH implementations. SCP is a command line program that can be used to upload or download files.

Prerequisites

Uploading Files

You can upload files to the server using the following syntax:

scp SourceFile user@host:directory/TargetFile

Example: scp *.doc username@mason.gmu.edu:your_directory_path

You can download files to your workstation using the following syntax:

scp user@host:directory/SourceFile TargetFile

Example: scp username@mason.gmu.edu:your_directory_path .

For personal sites, your_directory_path will likely be something like /home/u3/username/public_html/. You can find out the exact directory, by connecting to the server via SSH and running the pwd command.

For colleges, departments, and student organizations, your_directory_path would be something like /usr/local/htdocs/directory where directory is whatever appears after http://www.gmu.edu/ in the web address.

Last Updated: June 4, 2014