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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Use scp for a simple, one-time transfer; use rsync over SSH when you will repeat the job or move a large directory tree; and use sftp when you need to browse and transfer files interactively. Every method requires network reachability, a valid account on the destination server, permission to read the source, and permission to write the destination.

The examples below assume you are running commands from a Linux shell, that server-a is the source and server-b is the destination, and that user is an account allowed to log in on the relevant host. Replace those placeholders with your real paths, hostnames and account names.

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

Choose the right transfer method

All three tools use the SSH access model in these examples, so they inherit SSH authentication, encryption and account permissions. Their practical differences are about workflow rather than a different security boundary.

Tool Best use What it does well Important limitation
scp One-off file or directory copy Short, familiar commands with little setup Repeating a large transfer sends files again instead of synchronizing only changes
rsync over SSH Backups, deployments, migrations and recurring synchronization Compares source and destination and transfers differences; can preserve selected metadata A normal local rsync process cannot address two arbitrary remote paths at once
sftp Interactive file management Browse, select, upload and download files in a session Less convenient than a single command for scripting and less specialized than rsync for delta synchronization

The OpenSSH manual describes scp as a tool that “copies files between hosts on a network.” The rsync manual calls rsync “a fast and extraordinarily versatile file copying tool.” Those descriptions match the decision above: scp minimizes command complexity, while rsync is built for repeated synchronization.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Check connectivity and permissions first

A transfer can fail even when the network is working. Test the destination login and the exact destination directory before starting a large copy.

  1. Confirm that the destination name resolves and SSH accepts your account:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    ssh user@server-b 'id'
  2. Check that the destination exists and is writable by that account:

    ssh user@server-b 'test -d /remote/path && test -w /remote/path'

    No output and an exit status of zero means both tests passed. A failed test means you should correct the path or permissions before transferring.

  3. Inspect the source path and its ownership:

    ls -l /source/path

Successful SSH authentication does not imply write access to every directory. A destination such as /srv/app may be writable only by a service account or by root. Use a dedicated account with only the permissions required for the transfer. If ownership must be preserved, remember that the destination filesystem, account privileges and server policy may prevent an ordinary user from setting owner or group values.

Copy a file with scp

For a one-time transfer, scp is usually the shortest path from source to destination. Its syntax is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
scp /local/path/file user@server-b:/remote/path/

This reads /local/path/file on the machine where you run the command and writes it into /remote/path/ on server-b. The final slash makes the intended directory clear; the destination directory must already exist unless you create it separately.

Copy a directory recursively

Add -r when the source is a directory:

scp -r /local/path/directory user@server-b:/remote/path/

This normally creates /remote/path/directory and copies its contents beneath it. If you want only the directory’s contents in an existing destination, specify the contents explicitly or use rsync, whose trailing-slash behavior is easier to control for that case.

Download from another server

Reverse the source and destination to pull a file to the machine where you are working:

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
scp user@server-a:/remote/path/file /local/path/

You can also pull a directory recursively:

scp -r user@server-a:/remote/path/directory /local/path/

Use a particular SSH key

If the account requires an identity file that is not your default key, add -i:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
scp -i /path/to/key /local/path/file user@server-b:/remote/path/

Protect the private key so that only its intended owner can read it, and use an SSH agent or an approved secret-management process to handle a passphrase rather than putting secrets in a script.

What scp does not solve

Scp is not a synchronization database. If you run the same command again, it does not generally calculate a block-level delta for a changed large file; it copies the file according to its normal transfer behavior. For recurring jobs, interrupted transfers or trees containing many unchanged files, rsync is usually the better fit.

Synchronize files with rsync over SSH

Rsync can copy to or from a remote host through a remote shell such as SSH. Its delta-transfer algorithm compares the source and destination and sends only the differences it can identify, which reduces work on repeat transfers. The command most people need is:

rsync -avP /local/path/ user@server-b:/remote/path/

Here, -a requests archive behavior, -v increases the detail printed in the terminal, and -P combines progress information with retention of partial files. Archive mode requests preservation of common attributes and recursive copying, but the result remains subject to destination permissions, filesystem support and the account running rsync.

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

Understand the trailing slash

The slash on the source changes the destination layout:

  • /local/path/ means “copy the contents of path into the destination.”
  • /local/path generally means “copy the directory named path itself under the destination.”

For example, with a destination of /remote/path/, the first form places files such as report.csv at /remote/path/report.csv, while the second generally produces /remote/path/path/report.csv. Check this detail before a deployment or migration.

Preview changes with a dry run

Use --dry-run to see what rsync would change without copying data:

rsync -avP --dry-run /local/path/ user@server-b:/remote/path/

Review the listed paths, especially when the source and destination differ only by a missing or extra trailing slash. Remove --dry-run only after the proposed file set and destination are correct.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Copy a remote tree back to the local machine

Put the remote path first to pull data:

rsync -avP user@server-a:/remote/path/ /local/path/

The same archive, verbosity and partial-file considerations apply in the opposite direction.

Metadata, links and privileges

Archive mode requests preservation of links, permissions, timestamps and other metadata, and rsync has options for links, devices, owners and groups. It cannot override the destination’s rules. An unprivileged account may be unable to create device files, set another user’s ownership or apply a mode that the filesystem rejects. If exact ownership is required, arrange the transfer with an appropriately privileged account or perform a controlled ownership step on the destination after the copy. Do not grant broad root access merely to make a transfer convenient.

Remote-to-remote transfers with rsync

A commonly misunderstood command is:

rsync -avP user@server-a:/remote/path/ user@server-b:/remote/path/

A standard rsync process started on your local machine does not support arbitrary copying between two remote hosts. The rsync manual explicitly limits the normal model to a local path and one remote host. To move data between two servers, run rsync on one endpoint (or use a deliberate staging design).

Run rsync on the source server

Log in to server-a and have it send directly to server-b:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh user@server-a 'rsync -avP /remote/path/ user@server-b:/remote/path/'

This requires the account on server-a to read the source and the account used for server-b to authenticate and write there. If the source account and destination account differ, specify the appropriate destination account explicitly.

Use a local staging directory

When direct server-to-server authentication is not allowed, copy to a controlled local staging directory, verify the result, and then send it onward:

rsync -avP user@server-a:/remote/path/ /local/staging/path/
rsync -avP /local/staging/path/ user@server-b:/remote/path/

Staging consumes local disk space and adds a second transfer, but it makes inspection, malware scanning, retention and rollback easier.

Use SFTP for an interactive session

SFTP is useful when you need to browse directories, transfer several selected files or issue file-management commands as you work. Start a session with:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sftp user@server-b

At the sftp> prompt, upload one file or a whole directory:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
sftp> put /local/path/file /remote/path/file
sftp> put -r /local/path/directory /remote/path/
sftp> exit

You can use the session to inspect locations and select individual files instead of constructing a separate command for each one. The SFTP command set also includes remote permission changes with chmod; use that only when the account is authorized to alter the target mode.

When SFTP is preferable

  • Several unrelated files need to be uploaded or downloaded during one connection.
  • You need to browse the remote directory before deciding what to copy.
  • A person, rather than a scheduled script, is choosing files interactively.

For a scripted one-off, one scp command is simpler. For recurring synchronization, rsync’s comparison and delta behavior are more specialized.

Set up key-based authentication for repeat transfers

Typing a password for every scheduled or repeated copy is both inconvenient and difficult to automate safely. Install a public key on the destination account with ssh-copy-id:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh-copy-id user@server-b

The command installs your public key in the remote account’s authorized_keys file. After it completes, test the account:

ssh user@server-b 'id'

Then run the transfer normally:

rsync -avP /local/path/ user@server-b:/remote/path/

Keep the private key readable only by its intended user. For unattended jobs, protect the key with an agent or an approved secret-management process, restrict the destination account’s permissions and limit the key’s use where your SSH policy permits. A key removes interactive password entry; it does not remove the need to authorize the account and protect the server.

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

Verify a transfer instead of assuming success

Do not treat a returned shell prompt as proof that every expected file arrived. Check the destination and compare the important properties.

  1. List the destination contents:

    ssh user@server-b 'ls -l /remote/path/'
  2. For a directory synchronized with rsync, repeat the command with --dry-run. An empty change list indicates that rsync currently sees no differences under the options you selected.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Check a critical file’s size and checksum on both hosts. For example:

    sha256sum /local/path/file
    ssh user@server-b 'sha256sum /remote/path/file'
  4. Open or test the transferred data with the application that will use it. A file can have the expected name and size but still be unusable because of permissions, an incomplete application-level transaction or an incompatible format.

    Best Value
    Sale
    Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
    • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
    • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
    • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
    • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
    • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

When a transfer is interrupted, rsync with -P can retain partial data for a later continuation. Inspect the result before treating a resumed job as complete.

Troubleshoot common failures

“Permission denied” on the destination

Confirm the account and directory independently:

ssh user@server-b 'id && test -d /remote/path && test -w /remote/path'

If the directory is not writable, copy to a directory the account owns, ask an administrator to grant the minimum required access, or use an approved privileged workflow. Do not assume that adding -a or -r can bypass filesystem permissions.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

“No such file or directory”

Check both sides for spelling, case and path context. A relative path is interpreted from the shell’s current directory; an absolute path such as /var/data/file is unambiguous. On the destination, create the parent directory through an authorized account before starting the transfer.

Authentication or key errors

First test plain SSH with the same account and host. If that fails, fix hostname resolution, network access, the SSH service, account authorization or key permissions before debugging scp or rsync. If you need a non-default key, include -i /path/to/key in scp or configure the corresponding SSH identity for rsync.

Unexpected directory nesting

Inspect whether the rsync source ended in a slash. Use --dry-run and correct /source/ versus /source before repeating the real copy.

Rsync reports metadata errors

Read the specific warning rather than discarding it. Ownership, groups, device files, links and modes may require privileges or filesystem features unavailable to the destination account. Decide which metadata is actually required, then adjust the account, destination or rsync options deliberately.

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

Remote-to-remote rsync fails immediately

Do not keep adding flags to a two-remote-path command. Run rsync on one server through SSH, or use a local staging directory as shown earlier. The topology, not the progress option, is the problem.

Security and operational practices

  • Use hostnames or addresses you have verified, and check the SSH host-key prompt before accepting a new identity.
  • Use a transfer account limited to the source files and destination directory it needs.
  • Prefer key authentication for repeat jobs, protect private keys and avoid embedding passwords in shell history or scripts.
  • Use --dry-run before an rsync command that could overwrite or delete important data. The commands in this guide do not include deletion options; adding one requires a separate backup and rollback plan.
  • Transfer into a temporary destination and rename it into place when an application must never observe a partially populated release. Coordinate that procedure with the application’s own locking and ownership requirements.
  • Record which account, source path, destination path and metadata expectations a scheduled job uses. A future administrator should be able to reproduce or safely stop it.

A practical decision checklist

  1. One file or one directory, one time: use scp, adding -r for a directory and -i when a specific key is needed.
  2. Recurring copy, backup or large tree: use rsync -avP over SSH, verify the trailing slash and preview with --dry-run.
  3. Several manually selected files: open an sftp session and use put or put -r.
  4. Two remote servers: run rsync on one endpoint or stage the files locally; a normal local rsync command cannot directly connect two remote paths.
  5. Repeated automation: install a public key with ssh-copy-id, restrict the account and verify permissions before scheduling the job.

The deciding factors are workflow, not just speed: scp is the straightforward copier, rsync is the synchronizer, and SFTP is the interactive file manager. In every case, validate connectivity, account authorization and destination write access before moving data.

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.