Search Docs by Keyword

Table of Contents

Copying Data to & from the FASRC cluster using SCP or SFTP

SCP (Secure Copy) From/To the cluster

We generally recommend using SCP to copy data to and from the cluster. It is available across the cluster (login nodes, interactive sessions, NoMachine or batch jobs). It’s usage is simple, but the order that file locations are specified is crucial. SCP always expects the ‘from’ location first, then the ‘to’ destination. Depending on which is the remote system, you will prefix your username and server to one of the locations. scp [username@server:][location of file] [destination of file] or scp [location of file] [username@server:][destination of file] Below are some examples of the two most common uses of SCP to copy to and from various sources.

Note: We use “~” in the examples. The tilde “~” is a Unix short-hand that means “my home directory”. So if user johnharvard uses ~/ this is the same as typing out the full path to his home directory (easier to remember than /n/home05/johnharvard/ ). You can, of course, specify other paths (ex. – /n/holyscratch01/my_lab/johnharvard/output/files.zip)

Copying Files From the FASRC cluster to Another Computer

From a terminal/shell on a FASRC node you’ll issue your SCP command, enter your the cluster password and OpenAuth token code.
scp johnharvard@login.rc.fas.harvard.edu:~/files.zip /home/johnharvard/
Password:
Enter PASSCODE:
files.zip 100% 9664KB 508.6KB/s 00:19

This copies the file files.zip from from your home directory (~ is a Unix shortcut for ‘my home directory’) on the cluster to the /home/johnharvard/ directory on the computer you issued the command from.

Copying Files From Another Computer to the FASRC cluster

From a terminal/shell on your computer (or another server or cluster) you’ll issue your SCP command, enter your the cluster password and OpenAuth token code.
scp /home/johnharvard/myfile.zip johnharvard@login.rc.fas.harvard.edu:~/
Password:
Enter PASSCODE:
files.zip 100% 9664KB 508.6KB/s 00:19

This copies the file files.zip from from the /home/johnharvard/ directory on the computer you issued the command on to your home on the cluster. While it’s probably best to compress all the files you intend to transfer into one file, this is not always an option.

To copy the contents of an entire directory, you can use the -r (for recursive) flag.
scp johnharvard@login.rc.fas.harvard.edu:~/mydata/ /home/johnharvard/mydata/
Password:
Enter PASSCODE:
files.zip 100% 9664KB 508.6KB/s 00:19

This copies all the files from ~/mydata/ (~ is a Unix shortcut for ‘my home directory’) on the cluster to the /home/johnharvard/mydata/ directory on the computer you issued the command from.

SFTP From/To Your Computer to the FASRC cluster

See our guide for using Filezilla, a cross-platform FTP client, to transfer files using SFTP on Mac, Windows or Linux. You can transfer files to/from the cluster from your computer or any resources connected to your computer (shared drives, Dropbox, etc.) SFTP File Transfer Using Filezilla

NB: If you are using SecureFX, you cannot use the “wizard” and you must go to the SSH2 tab and check only “Keyboard Interactive” Authentication.

© The President and Fellows of Harvard College
Except where otherwise noted, this content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.