It is simple to sync files using Mercurial over SSH.
1. Set up your computer to ssh to the remote computer without a password.
2. Add the following to the .hg/hgrc file (if it doesn’t exist, create it).
[paths] default = ssh://user@target:port/path/to/repository
You can now push to default over SSH.