October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Rsync vs SCP: Which Linux Copy Command Should You Use?

Use scp for simple one-off copies; use rsync for repeat synchronization, filters, broader metadata preservation and efficient updates.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use scp for a straightforward one-off copy between computers. Choose rsync when you need to synchronize a directory repeatedly, filter what gets copied, preserve a broader set of attributes, or update files already at the destination efficiently. They overlap, but scp is the simpler copy command; rsync is the more configurable synchronization tool.

Rsync vs SCP: which is better for copying files?

Task Better fit Why
Copy one file once scp Its syntax is direct, and current OpenSSH uses SFTP over SSH by default.
Keep a remote directory in sync rsync It can identify unchanged files and transfer changed portions of existing destination files.
Choose files with include or exclude rules rsync It provides filtering controls as well as synchronization options.
Preserve a broad set of attributes rsync Archive mode includes links, permissions and ownership where the user and filesystem permit.
Connect to a server that requires the legacy SCP protocol scp -O This forces the legacy protocol; use it only for compatibility needs.

Neither command is universally faster. The result depends on factors such as file sizes, how much has changed, compression, the network, endpoint performance and software versions. The manuals describe transfer mechanisms, not a head-to-head benchmark.

Does SCP use SFTP now?

Yes. The OpenSSH scp manual says that since OpenSSH 9.0, scp has used SFTP by default. It runs over an SSH connection and uses the same authentication and security as a login session. The -O option switches to the legacy SCP protocol, for example when a server does not support SFTP.

That means the old shorthand that SCP always uses its original protocol is out of date. Legacy mode has different behavior: remote shell interpretation is involved, including for wildcard matching, so paths and quoting need care. Defaults and compatibility depend on the installed OpenSSH version and the remote server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I copy a file or directory over SSH?

Use SCP for a direct copy

# Copy a local file to a remote host
scp ./report.txt user@example:/srv/incoming/

# Copy a remote file to the current directory
scp user@example:/srv/logs/app.log .

# Copy a directory recursively
scp -r ./site user@example:/srv/www/

For SCP, uppercase -P specifies the SSH port. Lowercase -p preserves modification and access times and file mode bits; it does not mean “port.” Recursive -r copying follows symlinks it encounters while traversing the directory tree.

Use rsync to synchronize over SSH

# Synchronize directory contents, preserving archive attributes
rsync -av ./site/ user@example:/srv/www/site/

# Preview proposed changes without applying them
rsync -avn ./site/ user@example:/srv/www/site/

In the remote-shell form shown here, the single colon separates the host from the remote path and rsync normally uses SSH for transport. Both local and remote ends need rsync installed, and they negotiate a compatible protocol.

Pay attention to the source path’s trailing slash: ./site/ copies the directory’s contents into the destination, while ./site copies the directory itself so it appears beneath the destination path. Use -n for a dry run and inspect the proposed changes before adding options such as --delete, which can remove destination files.

Does rsync resume interrupted transfers?

Rsync can reduce retransmission when updating an existing file: its default quick check compares size and modification time, and its delta-transfer algorithm can send changed portions of a file already at the destination. The --partial option keeps a partially transferred file. These features do not guarantee that every retry continues at precisely the interruption point.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
# Keep a partial file and show progress
rsync -avP ./large-image.iso user@example:/srv/archive/

Here, -P is the rsync combination for partial-file retention and progress. It is unrelated to SCP’s uppercase -P, which specifies a port.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Is SCP still secure? Is rsync encrypted?

OpenSSH’s default scp transfer uses SFTP over SSH. Rsync’s encryption depends on its transport: the remote-shell form using SSH is encrypted, but daemon mode is different. A double-colon path or an rsync:// URL connects directly to an rsync daemon over TCP and is not encrypted by that transport. For sensitive data over an untrusted network, tunnel daemon traffic through SSH or protect it with TLS.

For untrusted incoming files, choose a dedicated destination directory and review its contents. Rsync has separate symlink controls, and its security guidance warns about risks from untrusted remote content and symlinks.

Which command should you choose?

  • Choose scp for a simple, one-time file or directory copy when you do not need synchronization controls.
  • Choose rsync for recurring directory updates, selective transfers, or broader attribute preservation.
  • Use scp -O only if compatibility requires the legacy SCP protocol.
  • For rsync daemon mode, account for its unencrypted TCP transport rather than assuming SSH protection.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.