SCP & rsync Command Builder
Choose the paths. Set the options. Copy the command.
Free · No signupBuilt entirely in your browser
SCP and rsync command builder
Transfer direction
This computer → Remote server
Source on this computer. A single file or directory.
Destination on the server. Relative paths start in its login home.
Hostname, IP address or ~/.ssh/config alias.
Leave empty to use your SSH config or local login name.
Empty uses your SSH config, otherwise port 22.
Path to your private key. No key upload is needed.
Transfer route
./distRemote server/var/www/appscp -r -- ./dist deploy@192.0.2.10:/var/www/appFor Bash / Zsh on Linux, macOS or WSL. Requires OpenSSH 9+ with its default SFTP protocol. Legacy SCP protocol (-O) is not supported.
Enter paths without wrapping quotes. ~/ expands to the relevant home directory; other shell variables and wildcard paths are not expanded.
Built in your browser. Hosts, paths and key filenames are not uploaded or saved. This tool generates text; it does not connect or transfer files.
Move files visually
Skip the flags with CtrlOps File Manager.
Browse remote directories, upload and download files, and edit configuration from your desktop workspace.
The flags, explained
A quick copy.
Or a repeatable sync.
SCP is useful for a one-off file transfer. Rsync compares the source and destination, making it useful for repeat deployments, backups and filtered directory syncs.
| Flag | What it does |
|---|---|
scp -r | Copy directories recursively; SCP follows symlinks encountered in traversal. |
scp -P 2222 | Use a custom SSH port. Capital P is the port; lowercase p preserves times and modes. |
scp -i key | Choose a private-key file for authentication. |
rsync -a | Recurse and preserve symlinks, permissions, times, owner and group where permitted. |
rsync -z | Compress file data during the transfer. |
rsync -s | Send protected remote arguments through the rsync protocol. Requires rsync 3+ on both ends. |
rsync --progress | Show progress for individual files. |
rsync --partial | Keep partial files after an interrupted transfer. |
rsync --exclude=PATTERN | Skip matching paths and protect them from destination deletion. |
rsync --delete | Delete destination entries absent from the source within synchronized directories. |
rsync -n --itemize-changes | List the proposed changes without copying or deleting files. |
rsync -e "ssh -p 2222" | Pass a custom port and identity file through the SSH transport. |
Before you run it
Know the source.
Check the destination.
Run from your local machine
Select upload to send a local file or directory to the server, or download to bring a remote path back to this computer. The local and remote path fields keep their meaning when you change direction. Replace the example host, user and paths before running a command. The builder creates command text and never opens an SSH connection.
Use the right tool and version
SCP commands target OpenSSH 9+ using its default SFTP protocol, so legacy SCP mode is not supported. Rsync commands use protected arguments (-s), which require rsync 3+ on both machines; a bundled older rsync may need upgrading. Both commands target a Bash or Zsh terminal on Linux, macOS or WSL. Use a WSL path such as /mnt/c/Users/... rather than a Windows drive path.
Keep SSH settings in the right place
SCP uses capital -P for an SSH port. Rsync passes SSH options through -e, which this builder quotes separately. An identity file is a path to an existing private key, not a key upload. Leave user, port and key blank to use the matching settings from your SSH config. You can create a named host with the SSH config generator.
Read the trailing slash and delete options together
For a directory source, ./dist/ means its contents, while ./dist includes the directory itself. This applies to the source on either an upload or a download. Preserve the slash you intend and review the transfer route. Turning on --delete also turns on dry run, so you can preview changes first. After reviewing, turn dry run off to generate a command that applies them.
Enter paths as data
Enter a path without adding surrounding shell quotes. Spaces, apostrophes, dollar signs and backticks are quoted by the builder. A leading ~/ means the appropriate home directory; other shell variables are treated literally. Wildcard paths are not supported: select a directory and use one rsync exclude pattern per line instead. File permissions, ownership and remote access still depend on your account and server.
For the complete syntax, see the OpenSSH scp manual and the rsync manual.
SCP & rsync FAQ
File transfers,
explained.
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 destination files that are absent from the source within the synchronized directories. Excluded files remain protected unless you add --delete-excluded, which this builder does not use. Test with -n (dry run) first to preview what would be removed. Enabling --delete in this builder also enables dry run; you can turn dry run off after reviewing the command.
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.
Keep working
Related tools for your next task.