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.
scp -r ./dist deploy@192.0.2.10:/var/www/appRun 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. Or skip the flags altogether: CtrlOps gives you a visual file manager over SSH to drag, drop, and edit remote files.
How to use this builder
- Pick
scporrsync, then choose the direction (upload or download). - Fill in the local path, the remote user and host, and the remote path.
- Set a custom port or identity file if you need them - they are added in the right form for each tool.
- Toggle the flags you want. For rsync, add an exclude pattern to skip files like
node_modules. - 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. Better yet, define the port and key once as a named host with our SSH config generator and both commands shrink to scp file host:. If you would rather drag files across than type either command, the File Manager does the same job from a window.
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
| Flag | What it does |
|---|---|
| scp -r | Copy a directory and its contents recursively. |
| scp -P 2222 | Use a non-default SSH port (capital P for scp). |
| scp -i key | Authenticate with a specific private key. |
| rsync -a | Archive mode: recurse and preserve permissions, times, and symlinks. |
| rsync -z | Compress data during transfer. |
| rsync --progress | Show a live progress bar for each file. |
| rsync --delete | Remove destination files missing from the source (exact mirror). |
| rsync -n | Dry run - show what would change without copying. |
| rsync -e "ssh -p 2222" | Tell rsync which SSH command (port, key) to tunnel over. |
Frequently asked questions
Related developer tools
SSH Key Generator
Generate Ed25519 or RSA key pairs in your browser. Nothing is uploaded.
OpenSSH to PPK Converter
Convert an OpenSSH key to PuTTY .ppk format for PuTTY, Pageant, and WinSCP.
SSL Certificate & CSR Decoder
Decode certificates, CSRs, and chains - expiry, SANs, fingerprints, chain order. Nothing uploaded.
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