SSH / SCP Command Builder
Construct syntactically validated, flag-optimized SCP and Rsync remote copy commands with port, key, and protocol options — entirely on this device.
scp -p -C ./dist.tar.gz ubuntu@app.example.com:/var/www/html/
rsync -avzP ./dist.tar.gz ubuntu@app.example.com:/var/www/html/
- Preserves modification times, access times, and file modes from original files.
- Enables SSH compression over slow networks to speed up transfer.
Do it offline:$
How to use it
- Select your file transfer direction: Local to Remote (upload), Remote to Local (download), or Remote to Remote.
- Specify source and destination file or directory paths.
- Enter target SSH credentials including user, hostname/IP, custom port, and private key path (~/.ssh/id_ed25519).
- Toggle optimization flags such as recursive directory traversal (-r), timestamp preservation (-p), and gzip compression (-C).
- Copy the constructed scp command or the recommended rsync alternative.
Build syntax-validated, flag-optimized SCP and Rsync remote copy commands for local-to-remote uploads, remote downloads, custom SSH ports, private keys, and legacy protocol compatibility.
How it works
SCP (Secure Copy Protocol) copies files over an SSH encrypted transport between networked hosts.
A frequent source of errors is port flag casing: scp requires an uppercase '-P' for the SSH port, whereas the standard ssh command and rsync expect lowercase '-p'.
In OpenSSH 9.0+, scp defaults to the modern SFTP protocol under the hood. For older systems that lack SFTP subsystems, the legacy '-O' flag forces raw original SCP mode.
For complex or resumable file transfers, rsync offers differential block delta syncing, bandwidth rate-limiting, and automatic resumption.
Examples
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Common errors
FAQ
Why does SCP use -P while SSH uses -p for specifying ports?
Historical convention! In scp, lowercase '-p' was already reserved for 'preserve' (preserving file modification times, access times, and permissions), so the OpenSSH authors assigned uppercase '-P' for port.
What is the difference between SCP and Rsync?
SCP blindly transfers entire files every time. Rsync calculates rolling checksums and only transmits altered byte blocks, while supporting transfer resumes and progress bars.
Why might scp fail with 'subsystem request failed on channel 0' on legacy servers?
Modern OpenSSH uses SFTP by default. If the destination server does not have the SFTP subsystem enabled in its sshd_config, add the '-O' flag to force legacy SCP protocol.