How do you copy files over SSH? scp vs rsync vs sftp.
BeginnerConceptNetworking, SSH & Scheduling
Answer
scp -r ./dist user@web:/var/www/ # simple copy (OpenSSH 9 uses SFTP protocol underneath)
rsync -avz --delete ./dist/ user@web:/var/www/dist/ # delta transfer, resumable
sftp user@web # interactive
rsync only sends changed parts, preserves metadata, and can resume, so it is the default for anything big or repeated. The trailing slash on the source means "contents of".
More on Networking, SSH & Scheduling
Which `ip` commands replace ifconfig, route and arp?BeginnerWhat does `ss` show, and which flags do you use?BeginnerExplain the TCP connection states you see in ss.AdvancedWhat happens, step by step, when you run `curl https://example.com`?AdvancedWhich curl flags are most useful for debugging?BeginnerHow do you use `dig` for DNS troubleshooting?Beginner