File Transfer with rsync, scp, sftp

File Transfer with rsync, scp, and sftp

SeaWulf supports secure file transfers using SSH-based tools: rsync, scp, and sftp. All transfers require two-factor authentication via DUO.

Recommended: Connect via Stony Brook VPN first to avoid multiple authentication prompts during file transfers.

Using scp

scp is simple and good for one-off transfers. Bundle multiple files into a single command when possible:

scp file1.txt file2.txt your_netid@login.seawulf.stonybrook.edu:/gpfs/home/your_netid/
scp your_netid@login.seawulf.stonybrook.edu:/gpfs/home/your_netid/output.txt ./

Or use wildcards or brace expansion:

scp *.txt your_netid@login.seawulf.stonybrook.edu:subdir
scp your_netid@login.seawulf.stonybrook.edu:'/path/{a,b,c}.txt' ./

Note: The quotes around the remote path ensure brace expansion happens on the remote server.

Using rsync

rsync is more powerful than scp. It can resume interrupted transfers, only sends file differences (not entire files), and is more efficient when many files are involved:

rsync myfolder/ your_netid@login.seawulf.stonybrook.edu:/gpfs/home/your_netid/myfolder/
rsync your_netid@login.seawulf.stonybrook.edu:/gpfs/projects/SmithGroup/data ./data

Use rsync for: Large files, interrupted transfers that need resuming, syncing directories with many files, or when you only want to transfer changes.

Using sftp

sftp opens an interactive session for browsing and transferring files:

sftp your_netid@login.seawulf.stonybrook.edu
sftp> cd /gpfs/home/your_netid
sftp> get myfile.txt
sftp> put localfile.txt
sftp> ls
sftp> bye

An interactive session is useful when you need to explore directories or transfer multiple files in different locations.

Graphical Options for Windows

MobaXTerm

We recommend MobaXTerm for Windows users. Select "New Session" and choose "SFTP". After logging in, you'll see your local file system on the left and your SeaWulf home directory on the right. Transfer files by dragging and dropping between panels.

Important: When using MobaXTerm for SSH sessions, a small sidebar appears with an SFTP browser. Create a dedicated SFTP session instead (as described above) to avoid repeated authentication prompts.

WinSCP

Another GUI option is WinSCP. Use SFTP protocol with host login.seawulf.stonybrook.edu and your NetID. Once connected, keep Transfer Settings at default. Transfer files by dragging and dropping between local and remote directories.

Open OnDemand

Open OnDemand is a web-based option. Once logged in, you can browse directories, upload/download files via drag-and-drop, and access any directory on SeaWulf (home, scratch, or project spaces). See our Open OnDemand Overview for details.

Troubleshooting authentication issues: If you experience connection problems, hanging, or missing authentication prompts, visit Stony Brook's DUO self-service portal to configure default devices or set the DUO_PASSCODE variable in your ~/.bashrc.