SFTP/SCP

The SSH-based SCP and SFTP utilities can be used to transfer files to and from NCCS systems. Because these utilities can be slow, we recommend using them to transfer small numbers of smaller files.

Usage

Both SCP and SFTP are available on all NCCS systems and should be a part of each user’s environment.

For example, on a UNIX-based system, to transfer the file file from your local system to your home directory on Phoenix as newfile, do the following for each:

SCP

scp file userid@phoenix.ccs.ornl.gov:newfile

SFTP

sftp userid@phoenix.ccs.ornl.gov
 sftp> put file newfile
 sftp> bye

where userid is your given NCCS user name.

Standard file transfer protocol (FTP) and remote copy (RCP) should not be used to transfer files to the NCCS high-performance computing (HPC) systems due to security concerns.

SCP works with NCCS systems only if your per-process initialization files produce no output. The means that .cshrc or .kshrc must not issue any commands that write to standard output. If you would like for this file to write to standard output for interactive sessions, you must edit the file so that it does so only for interactive sessions.

For ksh, use the following template:

TTY=`/usr/bin/tty`
 if [ $? = 0 ]; then
    /usr/bin/echo "interactive stuff goes here"
 fi

For csh, use the following template:

( /usr/bin/tty ) > /dev/null
 if ( $status == 0 ) then
    /usr/bin/echo "interactive stuff goes here"
 endif