Skip to main content

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.

Who This Track Is For
  • 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
When to Use SCP

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

ModuleFocusLessons
1. IntroductionFundamentals, SSH integration, tool comparison2
2. Core UsageDaily command patterns and transfers3
3. Advanced FeaturesPorts, ciphers, jump hosts3
4. TroubleshootingCommon errors and fixes1
5. CheatsheetQuick-reference table1

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

first-scp-transfer.sh
# 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.