Skip to content

Using scp at NERSC

Secure Copy (scp) is used to securely transfer files between two hosts using the Secure Shell (ssh) protocol.


Scp is suggested for smaller files (<~10GB), otherwise use Globus.

To transfer files into/out of NERSC using scp, you need an ssh client. On Linux/Unix and MacOS these should be installed by default, but on Windows you will need a GUI tool such as WinSCP.


Get a file from Data Transfer Node

scp /local/path

Send a file to Data Transfer Node

scp /local/path/myfile.txt

Use a pre-existing ssh key (like one made by sshproxy)

scp -i ~/.ssh/nersc /local/path

Using tar+ssh

When you want to transfer many small files in a directory, we recommend Globus. If you don't wish to use Globus, you can consider using ssh piped with tar.

Send a directory to Data Transfer Node:

tar cz /loca/path/dirname | ssh tar zxv -C /remote/path

Get a directory from Data Transfer Node:

ssh tar cz /remote/path/dirname | tar zxv -C /local/path