What is scp and what is its main limitation?
scp ("secure copy") copies files over an SSH connection — same encryption and login as ssh — but it always transfers whole files, even if only a few bytes changed.
scp is the simplest way to move a file between machines securely: it rides on SSH, so the transfer is encrypted and you authenticate exactly as you would for a shell login (password or key). The syntax mirrors cp, with remote ends written as user@host:/path:
scp /etc/hosts remoteuser@server:/home/remoteuser/ # local → remote
scp remoteuser@server:/etc/hostname ./ # remote → local
scp -i key.pem file.txt user@server:/path/ # use a specific SSH key
Useful modifiers: -r copies directories recursively, -p preserves timestamps/permissions.
The limitation that matters: scp is "dumb" about content — it sends the entire file every time, with no awareness of what's already at the destination. Re-copy a 1 GB file after changing one line and all 1 GB goes over the wire again. That's fine for one-off transfers but wasteful for repeated backups, which is exactly the gap rsync fills.
Go deeper:
scp(1) man page — OpenSSH secure copy (modern scp uses the SFTP protocol under the hood).