🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

💡 SSH & Remote April 19, 2026 7

Linux Command: scp

Secure file copy over SSH, ideal for quick one-off transfers

Terminal — SSH & Remote
Command
$ scp -P 2222 -r ./dist/ user@web01.example.com:/var/www/app/
Output
index.html 100% 4521 1.2MB/s 00:00 assets/app.js 100% 89KB 15.3MB/s 00:00

scp copies files securely over SSH. Flags: -P port, -r (recursive), -C (compress), -p (preserve timestamps). For large/many files, rsync is faster due to delta transfer; scp is best for quick, one-off copies.

Share this tip