You can securely synchronize directory structures between two Linux computers by using the following command:
rsync -ave ssh --delete myhost.example.com:Documents/ Documents/
The −−delete option ensures that any files or directories that no longer exist on the source are also removed from the destination.