Copy a Whole Directory over SSH with rsync

rsync is a tool for efficiently transferring and synchronizing files across systems by checking the timestamp and size of files.

With the following command, a whole directory can be copied over SSH to a remote machine maintaining even symbolic links:

rsync -avze /source_dir ssh [email protected]:/target_dir