Free tool · Runs in your browser

SCP & Rsync Command Builder

Build scp and rsync commands to copy files to and from a remote server - ports, keys, jump-free flags, and exclude patterns - without memorizing the syntax. Everything runs in your browser.

Files
Server
Options
scp command
$scp -r ./dist deploy@192.0.2.10:/var/www/app

Run this from your local machine. Quote any paths that contain spaces. For rsync, a trailing slash on the source directory copies its contents rather than the directory.

scp or rsync - which should I use?

Both copy files over SSH. scp is the simplest - great for a one-off copy of a file or folder. rsync is smarter: it only transfers what changed, can resume, show progress, mirror directories, and exclude paths, which makes it the better choice for deployments and repeated syncs.

Rule of thumb: reach for scp for a quick single transfer, and rsync for anything you will run more than once or that needs to stay in sync.

How to use this builder

  1. Pick scp or rsync, then choose the direction (upload or download).
  2. Fill in the local path, the remote user and host, and the remote path.
  3. Set a custom port or identity file if you need them - they are added in the right form for each tool.
  4. Toggle the flags you want. For rsync, add an exclude pattern to skip files like node_modules.
  5. Copy the generated command and run it from your local machine.

Ports and keys: the syntax differs

A common gotcha: scp uses an uppercase -P for the port (lowercase -p means "preserve"), while ssh and rsync use a lowercase port flag. rsync does not take a port directly - it passes one through SSH with -e "ssh -p 2222 -i ~/.ssh/key". This builder writes the correct form for whichever tool you pick, so you never have to remember which is which.

Test destructive syncs with a dry run first

rsync --delete makes the destination an exact mirror of the source - including deleting files on the destination that are not in the source. Always pair it with -n (dry run) first: rsync will print exactly what it would add, change, and delete without touching anything. Once the output looks right, remove -n and run it for real.

Common flags

FlagWhat it does
scp -rCopy a directory and its contents recursively.
scp -P 2222Use a non-default SSH port (capital P for scp).
scp -i keyAuthenticate with a specific private key.
rsync -aArchive mode: recurse and preserve permissions, times, and symlinks.
rsync -zCompress data during transfer.
rsync --progressShow a live progress bar for each file.
rsync --deleteRemove destination files missing from the source (exact mirror).
rsync -nDry run - show what would change without copying.
rsync -e "ssh -p 2222"Tell rsync which SSH command (port, key) to tunnel over.
SCP & rsync FAQ

Frequently asked questions

scp does a straightforward copy of files or directories over SSH. rsync is incremental: it compares source and destination and transfers only the differences, and it can resume, show progress, mirror with --delete, and exclude paths. Use scp for quick one-off copies and rsync for deployments or anything you sync repeatedly.
Use an uppercase -P for the port with scp, for example: scp -P 2222 ./file.txt deploy@host:/path. Note that lowercase -p means "preserve times and modes", not port - this is a common mistake. ssh and rsync use a lowercase port flag instead.
rsync does not take a port or key directly - pass them through SSH with the -e flag: rsync -avz -e "ssh -p 2222 -i ~/.ssh/id_ed25519" ./dist/ deploy@host:/var/www/app/. This builder generates the -e "ssh ..." form automatically when you set a custom port or identity file.
It deletes files on the destination that no longer exist in the source, making the destination an exact mirror. It is powerful but destructive, so always test it first with -n (a dry run) to preview exactly what would be removed before running it for real.
Add --exclude with a pattern, for example --exclude='node_modules' or --exclude='*.log'. You can pass --exclude multiple times for multiple patterns. In this builder, type the pattern into the Exclude field and it is added to the command.
Yes. A trailing slash on the source directory (./dist/) copies the contents of that directory into the destination. Without the trailing slash (./dist), rsync copies the directory itself into the destination, creating a subfolder. The distinction only applies to the source path.
Skip the command line

Move files without memorizing flags.

CtrlOps gives you a GUI file manager over SSH - drag, drop, and edit files on any server, with your credentials encrypted on your own machine. No more scp, no more remembering -P versus -p.

Start instantly· No credit card· No sneaky autorenewals