Referință rapidă

scp (Secure Copy) Ghid rapid: Transfer securizat de fișiere prin SSH

Ghid rapid pentru scp: transfer securizat de fișiere prin SSH, copiere recursivă (-r), specificarea portului (-P) și limitarea vitezei.

· Publicat

Basic Command Syntax

scp [options] source destination

Common Transfer Examples

# Upload local file to remote server
scp report.pdf user@remote.example.com:/var/data/

# Download remote file to current local directory
scp user@remote.example.com:/var/data/report.pdf .

# Transfer an entire directory recursively (-r)
scp -r ./dist/ user@remote.example.com:/var/www/site/

# Transfer between two remote servers via local workstation
scp user1@host1.com:/data/db.dump user2@host2.com:/data/

Useful Options

Option Description
-P <port> Specify custom SSH port (e.g. -P 2222)
-r Recursively copy entire directories
-C Enable compression during transfer
-p Preserve modification times, access times, and permissions
-l <limit> Limit bandwidth in Kbit/s (e.g. -l 800)
-v Verbose debug output

References

Subiecte conexe