Cheatsheet Pages / SSH Cheatsheet
How to sync a directory tree over SSH — rsync -e ssh
Only the differences should cross the wire, so re-running after a network drop is cheap.
Every flag and config keyword was checked against the OpenSSH 9.6 man pages, and the config examples were parsed for real with ssh -G.
rsync -avz -e ssh ./site/ deploy@example.com:/var/www/site/
rsync -avz -e "ssh -p 2222" deploy@example.com:/var/log/ ./logs/
# only the differences cross the wire, so re-running after a network
# drop is cheap — the default tool for syncing whole trees over ssh
