$scp
Securely copy files and directories between hosts over SSH connection.
scp [OPTIONS] SOURCE DESTTry `scp` Live in Interactive Sandbox
Zero-install client simulation with real-time feedback.
Overview & How scp Works
`scp` (Secure Copy Protocol) transfers files securely between a local host and a remote host, or between two remote servers, using the same authentication and encryption as SSH.
Common Flags & Command Options
| Flag / Option | Description |
|---|---|
| -r | Recursively copy entire directories. |
| -P [port] | Specify port to connect to on the remote host. |
| -i [keyfile] | Identity file for SSH private key authentication. |
Practical Real-World Examples
scp notes.txt user@remote-server:/home/user/docs/Uploads notes.txt to the remote server directory over SSH.
Frequently Asked Questions
Why do developers prefer rsync over scp for large backups?
`rsync` can resume interrupted transfers and only transfers modified delta byte chunks, saving enormous bandwidth.
Related Linux Commands
Copy files and directories to a destination path.
Transfer data from or to a server using HTTP, HTTPS, FTP, and more.
Non-interactive network downloader for HTTP, HTTPS, and FTP.
Send ICMP ECHO_REQUEST to network hosts to test connectivity and latency.
Print network connections, routing tables, interface statistics, and listening ports.
Securely log into remote Linux servers and execute commands over encrypted connections.