Use SFTP to transfer files

On this page:


Overview

The SSH File Transfer Protocol (SFTP), also known as the Secure File Transfer Protocol, enables secure file transfer capabilities between networked hosts. Unlike the Secure Copy Protocol (SCP), SFTP additionally provides remote file system management functionality, allowing applications to resume interrupted file transfers, list the contents of remote directories, and delete remote files.

The command-line secure file transfer program (sftp) and graphical SFTP clients, such as WinSCP and Fetch, use SSH2 encryption to authenticate and establish secure channels between networked hosts. Although SFTP clients are functionally similar to FTP clients, they employ different protocols; consequently, you cannot use a standard FTP client to connect to an SFTP server.

IU hostnames

Note:
As of October 14, 2018, SCP and SFTP file transfers to Big Red II, Big Red II+, Carbonate, and Karst require two-factor authentication using Duo. SSH public-key authentication remains an option for researchers who submit the "SSH public-key authentication to HPS systems" user agreement (log into HPC everywhere beta using your IU username and passphrase), which requires you to agree to set a passphrase on your private key when generating your key pair. If you have questions about how two-factor authentication with Duo may impact your workflows, contact the UITS Scientific Applications and Performance Tuning (SciAPT) team. If you have system-specific questions, contact the UITS High Performance Systems (HPS) team. For help with Duo, see Get started with Two-Step Login (Duo) at IU and Help for Two-Step Login (Duo).

At Indiana University, specify the following hostnames for SFTP file transfers involving these UITS resources (authenticate using your IU username and passphrase):

System Hostname
Big Red II bigred2.uits.iu.edu
Carbonate carbonate.uits.iu.edu
Karst karst.uits.iu.edu
Research Database Complex rdc.uits.iu.edu
Scholarly Data Archive sftp.sdarchive.iu.edu
Mercury (Pages) mercury.uits.indiana.edu
Webserve webserve.iu.edu

Graphical SFTP clients

Graphical SFTP clients simplify file transfers by allowing you to drag and drop icons from one window to another. Each icon represents a file or directory, and each window represents a computer's file system. When you open the program, you specify the name of the remote host to which you want to connect, and then authenticate with your username and password for that host.

For IU, students, faculty, and staff, two graphical SFTP clients, CyberDuck (for OS X) and WinSCP (for Windows), are available for free download from IUware. Both applications also are available for use on the computers in the IU Bloomington and IUPUI Student Technology Centers (STCs). Additionally, WinSCP is available for use on personal Windows workstations via IUanyWare.

Command-line SFTP

You can use command-line SFTP on systems running Linux, or from the Terminal in OS X. To start an SFTP session, at the shell prompt, enter:

  sftp username@hostname

For example, if your username is darvader, to connect to your account on the host deathstar.empire.gov, enter:

  sftp darvader@deathstar.empire.gov

Enter your password when prompted.

Some standard command-line SFTP commands include:

Command Function
cd Change the directory on the remote host.
chmod Change the permissions of files on the remote host.
chown Change the owner of files on the remote host.
exit (or quit) Close the connection to the remote host, and exit SFTP.
get Copy a file from the remote host to the local computer.
help (or ?) Get help on the use of SFTP commands.
lcd Change the directory on the local computer.
lls List the contents of the current directory on the local computer.
lmkdir Create a directory on the local computer.
ln (or symlink) Create a symbolic link for a file on the remote host.
lpwd Show the present working directory on the local computer.
ls (or dir) List the contents of the current directory on the remote host.
lumask Change the local umask value.
mkdir Create a directory on the remote host.
put Copy a file from the local computer to the remote host.
pwd Show the present working directory on the remote host.
rename Rename a file on the remote host.
rm Delete a file on the remote host.
rmdir Remove a directory on the remote host (the directory usually has to be empty).
version Display the SFTP version.
! Pop out to the shell prompt to enter other commands. To return to SFTP, enter exit. If you combine ! with a command (e.g., !pwd), SFTP executes the command without popping you out to the shell prompt.

This is document akqg in the Knowledge Base.
Last modified on 2018-12-07 17:17:29.

Contact us

For help or to comment, email the UITS Support Center.