Skip to content

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

Start with

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.

Transfer options

Transfer route

This computer./distRemote server/var/www/app
scp command
scp -r -- ./dist deploy@192.0.2.10:/var/www/app
Run from this computer

For 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.

Explore File ManagerDownload for MacDownload for Windows

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.

Common SCP and rsync flags
FlagWhat it does
scp -rCopy directories recursively; SCP follows symlinks encountered in traversal.
scp -P 2222Use a custom SSH port. Capital P is the port; lowercase p preserves times and modes.
scp -i keyChoose a private-key file for authentication.
rsync -aRecurse and preserve symlinks, permissions, times, owner and group where permitted.
rsync -zCompress file data during the transfer.
rsync -sSend protected remote arguments through the rsync protocol. Requires rsync 3+ on both ends.
rsync --progressShow progress for individual files.
rsync --partialKeep partial files after an interrupted transfer.
rsync --exclude=PATTERNSkip matching paths and protect them from destination deletion.
rsync --deleteDelete destination entries absent from the source within synchronized directories.
rsync -n --itemize-changesList 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.

Keep working

Related tools for your next task.

Your privacy preferences. We use product analytics to improve CtrlOps. Google measurement runs without analytics cookies. Live chat stays off until you allow it. Cookie policy