Glossary

scp

scp ("secure copy") transfers files over an SSH connection. Its syntax mirrors cp: source and destination, either of which can be user@host:path.

scp file.txt user@host:/tmp/            # local → remote
scp user@host:/tmp/file.txt .           # remote → local
scp -r directory/ user@host:/var/       # recurse
scp -P 2222 file host:/tmp/             # non-default port (capital P)
scp host1:/file host2:/file             # host → host (via your machine)

OpenSSH 9.0 (2022) switched scp's default transport from the legacy SCP protocol to SFTP internally, addressing long-standing protocol issues. For interactive multi-file work, sftp and rsync are usually better; for one-shot copies scp is still the most direct.

Related terms: SSH, sftp, rsync

Discussed in:

This site is currently in Beta. Contact: Chris Paton

Textbook of AI · Textbook of Usability · Textbook of Digital Health

Auckland Maths and Science Tutoring

AI tools used: Claude (research, coding, text), ChatGPT (diagrams, images), Grammarly (editing).