HPC FAQ - Transferring Files

Supercomputer documentation is always a work in progress! Please email questions, corrections, or suggestions to the HPC support team at help-hpc@uky.edu as usual. Thanks!

1. Why would I transfer files?

You will almost certainly want to upload program or data files from your workstation to the cluster and download results, programs, or data from the cluster to your workstation. You may want to copy data from another site or put data out somewhere for others to see and use.

Use scp or sftp to transfer files to or from the cluster, to or from your workstation, and to or from most other sites. These are related to the ssh (secure shell) client and will encrypt your transfer (and password) in the same way that ssh encrypts your login session.

2. How do I transfer files?

On Linux, Unix, or MacOS X:
MacOS X and most Linux and Unix systems come with scp and sftp already installed. If you are using your link blue userid on your workstation, then you may omit it from the scp or sftp commands, as you do with the ssh command. The free OpenSSH client includes scp and sftp, so if you installed it to get ssh, you will get scp and sftp at the same time.
Using scp is much like using cp
scp file1 file2 copies file1 (the source file) to file2 (the target file).
scp aprog.f77 dlx.uky.edu copies aprog.f77 in the current directory on your workstation to your home directory on the DLX. You might be prompted for your DLX password.
scp aprog.f77 dlx.uky.edu:newprog.f77 copies the same file to the DLX, but gives it a new name.
scp aprog.f77 userid@dlx.uky.edu:newprog.f77 copies the file to the DLX, but specifies the DLX userid.
Using sftp is much line using ftp

$ sftp jdough@dlx.uky.edu
jdough@dlx.uky.edu's password:
Connected to dlx.uky.edu.
sftp> ls
amber benchmarks1 sbatch.ps scratch test1
sftp> get sbatch.ps
Fetching /home/jdough/sbatch.ps to sbatch.ps
/home/jdough/sbatch.ps 100% 117KB 117.0KB/s 00:00
sftp> exit

On Windows:
The programs PSCP and PSFTP are free implementations of scp and sftp for Windows that are widely used. Download them from the PuTTY web page.

3. What is a secure shell (ssh)?

The secure shell (ssh) is a means of encrypting your login and other sessions. See the Secure Shell page for more information.

859-218-HELP (859-218-4357) 218help@uky.edu