Recommended Free Tools
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.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
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.
# 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.
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.
Rank #4
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.
Quick Recap
Best Value
Which command should you choose?
- Choose
scpfor a simple, one-time file or directory copy when you do not need synchronization controls. - Choose
rsyncfor recurring directory updates, selective transfers, or broader attribute preservation. - Use
scp -Oonly 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.




