Skip to main content
Linux & System Administration Tools

SCP Command Generator

Generate an scp command for copying files to or from a remote server, with recursive, port, and identity file options.

Choose a direction (upload or download), fill in the paths, and this tool generates the exact scp command.

For ongoing/repeated file synchronization rather than a one-off copy, the Rsync Command Generator is usually a better fit.

What Is scp?

scp (secure copy) copies files or directories between a local machine and a remote server over SSH - a straightforward option for a one-off file transfer.

Why Use This Tool?

Remembering which side of the colon the remote path goes on, and the exact flag for recursive directory copies (-r) or a custom port (-P, capital, unlike ssh's lowercase -p), trips people up regularly. This tool builds the command correctly.

How to Use It

  1. Choose a direction: upload (local to remote) or download (remote to local).
  2. Enter the source and destination paths, plus the remote host and user.
  3. Toggle recursive copy for directories, and set a custom port or identity file if needed.
  4. Copy the generated command and run it yourself.

Limitations

This builds the command text only - nothing is transferred by this tool. For large or ongoing transfers, rsync (see the Rsync Command Generator) is usually more efficient since it only copies changed data.

Frequently Asked Questions

Add the -r flag, for example scp -r ./site user@host:/var/www/. Without -r only single files are copied.

It is a historical difference: scp uses -P (capital) for the port because -p preserves file times.

scp is fine for simple copies. rsync is better for large or repeated transfers because it only sends changed parts and can resume.
Share this tool: