Learn how to quickly and securely transfer files between machines using scp, the SSH-based copy tool. 16.11.2025 | reading time: 2 min Move files between hosts fast and encrypted. The scp command copies files over SSH and is ideal for quick, authenticated transfers from the shell. A practical example Try this hands-on example: copy a local file to a remote host and fetch it back to verify the transfer; run the commands shown and observe the progress output: ```bash scp ~/workspace/report.txt dev@198.51.100.23:/home/dev/reports/ # password prompt report.txt 100% 12KB 0.0s # copy back to local machine scp dev@198.51.100.23:/home/dev/reports/report.txt ~/downloads/ # password prompt report.txt 100% 12KB 0.0s ``` Options that save time Use `-P` to change the SSH port and `-r` to copy directories recursively; add `-C` to enable compression and `-i` to select an identity file when using key authentication; `-p` preserves timestamps and permissions and `-o` passes arbitrary SSH options, for example to enable connection multiplexing. When scp isn't ideal scp is simple but has limits: it does not resume partial transfers and it is not optimized for syncing many files; for large or repeated transfers prefer rsync, for interactive browsing use sftp, and for mounting remote trees consider sshfs; note that recent OpenSSH implementations use an SFTP backend to improve safety compared with the old remote-shell based behavior. Try it and go deeper Practice key-based auth, try `scp -v` to see the SSH negotiation, and experiment with `-l` to limit bandwidth; keep exploring secure file transfer tools and consider formalizing skills with certifications like CompTIA Linux+ or LPIC-1 and intensive exam prep at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. network security utilities backup scripting