The scp command

OpenSSH secure file copy 3 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-r
Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal.

Examples

scp file.txt user@host:/path/

Upload

scp user@host:/path/file.txt .

Download

scp -r directory/ user@host:/

Recursive

Lessons that use scp