Use SFTP to transfer files

On this page:


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


Two-factor authentication using Two-Step Login (Duo) is required for access to the login nodes on IU research supercomputers, and for SCP and SFTP file transfers to those systems. SSH public key authentication remains an option for researchers who submit the "SSH public key authentication to HPS systems" agreement, in which you agree to set a passphrase on your private key when you generate your key pair. If you have questions about how two-factor authentication may impact your workflows, contact the UITS Research Applications and Deep Learning team. For help, 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 200
Scholarly Data Archive (SDA)

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.

Students, faculty, and staff can use two graphical SFTP clients, CyberDuck (for macOS) and WinSCP (for Windows), available for free download. Both applications are also available for use on the computers in the IU Bloomington and IU Indianapolis 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 macOS Terminal. 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, enter:


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 (for example, !pwd), SFTP executes the command without popping you out to the shell prompt.

This is document akqg in the Knowledge Base.
Last modified on 2024-05-08 14:31:19.