SCP Documentation
SCP (Secure Copy Protocol) is a command-line utility for securely transferring files between hosts over SSH. It is part of the OpenSSH suite and requires no additional installation on most Linux systems.
- Operators transferring files between servers quickly
- Developers pushing builds or configs to remote hosts
- Anyone who needs a fast, encrypted file copy without setting up sync infrastructure
SCP is best for one-off transfers where you know the exact source and destination. For recurring syncs, delta transfers, or cloud storage, prefer rsync or rclone.
Learning Path
| Module | Focus | Lessons |
|---|---|---|
| 1. Introduction | Fundamentals, SSH integration, tool comparison | 2 |
| 2. Core Usage | Daily command patterns and transfers | 3 |
| 3. Advanced Features | Ports, ciphers, jump hosts | 3 |
| 4. Troubleshooting | Common errors and fixes | 1 |
| 5. Cheatsheet | Quick-reference table | 1 |
SCP vs Other Tools
| Criteria | SCP | rsync | rclone |
| | -- | | -- |
| Transfer Type | Full copy | Delta (changed blocks only) | Full or delta |
| Cloud Support | No | No | 50+ providers |
| Resume Support | No | Yes (--partial) | Yes |
| Encryption | SSH (always) | SSH or none | Optional |
| Recursive Copy | -r flag | -r flag | Native |
| Best For | Quick one-off transfers | Server-to-server sync | Cloud backup/sync |
Quick Start
# 1) Copy a local file to a remote server
scp ./report.pdf user@server:/home/user/
# 2) Download a file from a remote server
scp user@server:/var/log/app.log ./
# 3) Copy an entire directory recursively
scp -r ./project/ user@server:/home/user/project/
Prerequisites
- Linux shell basics (
ls,cp, paths, permissions) - SSH key setup for remote hosts (or password access)
- OpenSSH client installed (pre-installed on most distros)
Next Step
Start with What is SCP.