Guide

SFTP vs SCP: which should you use for file transfer?

SFTP and SCP both run over SSH and both transfer files, but they're built for different jobs. Here's how they differ on features, safety, and why SFTP is usually the better pick today.

SFTP and SCP are easy to confuse: both run over SSH, both move files, and both are on every Unix box. But they were built for different jobs, and the modern recommendation has shifted firmly toward SFTP. Here’s the difference and when each makes sense.

What each one is

  • SCP (Secure Copy) is a thin, old utility that copies files over SSH. It does basically one thing: copy a file (or a directory tree) from A to B. No listing, no resume, no remote file management.
  • SFTP (SSH File Transfer Protocol) is a full file-transfer subsystem of SSH. It can list directories, resume interrupted transfers, rename and delete remote files, check attributes, and transfer with partial reads and writes.

How they compare

SCPSFTP
TransportSSHSSH
EncryptionYesYes
Directory listingNoYes
Resume interrupted transferNoYes
Remote file management (rename, delete)NoYes
Scriptable / interactiveCopy-onlyFull interactive client
Status reportingMinimalSSH_FX_* status codes

The important modern caveat about SCP

The traditional SCP protocol has known weaknesses and is effectively deprecated. As of OpenSSH 9.0 (2022), the scp command itself was changed to use the SFTP protocol underneath by default, precisely because the old SCP protocol was fragile and harder to secure. In other words, the tooling world has already moved toward SFTP, even when you type scp.

When SCP still makes sense

  • A quick one-off copy between two machines you control, where you just want scp file host:/path and nothing more.
  • Minimal environments where an scp binary is all that’s available.

When to use SFTP

  • Anything automated or recurring, where you want resume-on-failure and proper error reporting.
  • When you need to list, browse, or manage remote files, not just push one across.
  • Partner or client file exchange, where path-jailing users and auditing transfers matters. SCP gives you none of that; SFTP is the foundation for it.
  • Transfers into cloud object storage through a gateway, where SFTP’s directory and attribute operations map onto bucket prefixes.

The short answer

For a throwaway copy between two servers, scp is fine. For everything else, and especially anything involving partners, automation, or cloud storage, use SFTP. It’s more capable, better supported, and it’s where the tooling is heading anyway. To put SFTP in front of a cloud bucket you own, see SFTP to S3.

Try it on your own bucket

Connect a bucket you already own, Amazon S3, Azure Blob, Google Cloud Storage, or an S3-compatible store, and hand out a clean SFTP endpoint in minutes. Your files stay in your cloud.

Start free

← All guides